ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Standard functions / Certificate functions
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
CertificateCheckFileSignatureFile (Function)
In french: CertificatVérifieFichierSignatureFichier
Checks the correspondence between a signature and a file. The signature was kept as an external file.
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 file containing the signature
bufSignature is Buffer
bufSignature = CertificateSignFile(FullFileName, MyCertificate, MySignatureFile)


// Check the signature
SWITCH CertificateCheckFileSignatureFile(FullFileName, MySignatureFile)
	CASE certificateOk: Info("Valid signature and reliable certificate")
	CASE certificateInvalid: Info("Invalid signature or certificate")
	CASE certificateExpired: Info("Valid signature but certificate expired")
	CASE certificateUntrusted: Info("Valid signature but trusted root" + ...
		"of certificate not reliable")
END
Syntax
<Result> = CertificateCheckFileSignatureFile(<File name> , <Signature file>)
<Result>: Integer constant
Result of signature check:
certificateExpiredValid signature but expired certificate.
certificateInvalidInvalid signature or certificate.
certificateOkTrusted signature and certificate.
certificateUntrustedValid signature but untrusted certificate root.
<File name>: Character string
Full or relative name of the file on which the check must be performed.
<Signature file>: Character string
Full or relative name of the external file containing the signature. This file is created by CertificateSignFile.
Remarks
Component: wd300std.dll
Minimum version required
  • Version 16
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/28/2025

Send a report | Local help