ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / Certificate functions
  • Managing certificates in WEBDEV
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Checks the correspondence between a signature and a file. The signature was stored as a Buffer variable.
Example
MyCertificate is Certificate

// Open the certificate picker of Windows
MyCertificate = CertificateSelect()

// Cancellation or error
IF MyCertificate.Name = "" THEN
RETURN
END

// Checks whether the selected certificate is valid for signing
IF MyCertificate.ValidForSignature = False THEN
Info("The selected certificate cannot be used to generate a signature.")
RETURN
END

// Retrieve the buffer containing the signature
bufSignature is Buffer
bufSignature = CertificateSignFile(FullFileName, MyCertificate)


// Check the signature
SWITCH CertificateCheckFileSignatureBuffer(FullFileName, bufSignature)
CASE certificateOk: Info("Valid signature and trusted certificate")
CASE certificateInvalid: Info("Invalid signature or certificate")
CASE certificateExpired: Info("Valid signature but expired certificate")
CASE certificateUntrusted: Info("Valid signature but root confidence "+  ...
"of certificate not reliable")
END
Syntax
<Result> = CertificateCheckBufferSignatureFile(<File name> , <Signature buffer>)
<Result>: Integer
Result of signature check:
certificateExpired (3)Valid signature but expired certificate.
certificateInvalid (0)Invalid signature or certificate.
certificateOk (1)Trusted signature and certificate.
certificateUntrusted (4)Valid signature but untrusted certificate root.
<File name>: Character string
Full or relative name of the file on which the check must be performed.
<Signature buffer>: Buffer
Buffer containing the signature of the file. This buffer is returned by CertificateSignFile.
Remarks
WEBDEV - Server code

Managing certificates in WEBDEV

In order for the certificates to be visible to the site user, they must be installed on the server in the store of custom certificates of the Internet user.
Component: wd290std.dll
Minimum version required
  • Version 16
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 09/12/2023

Send a report | Local help