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
Checks the correspondence between a signature and a file. The signature was stored as a Buffer variable.
Example
MonCertificat is Certificate

// Ouverture du sélecteur de certificat de Windows
MonCertificat = CertificateSelect()

// Annulation ou erreur
IF MonCertificat.Name = "" THEN
	RETURN
END

// Teste si le certificat sélectionné est valide pour signer
IF MonCertificat.ValidForSignature = False THEN
	Info("Le certificat sélectionné ne permet de pas de générer une signature.")
	RETURN
END

// Récupération du buffer contenant la signature
bufSignature is Buffer
bufSignature = CertificateSignFile(NomCompletFichier, MonCertificat)


// Vérification de la signature
SWITCH CertificateCheckFileSignatureBuffer(NomCompletFichier, bufSignature)
	CASE certificateOk : Info("Signature valide et certificat fiable")
	CASE certificateInvalid : Info("Signature ou certificat invalide")
	CASE certificateExpired : Info("Signature valide mais certificat expiré")
	CASE certificateUntrusted : Info("Signature valide mais racine de confiance "+  ...
		"du certificat non fiable")
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
Component: wd300std.dll
Minimum version required
  • Version 16
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/27/2025

Send a report | Local help