|
|
|
|
|
- Managing certificates in WEBDEV
CertificateCheckFileSignatureBuffer (Function) In french: CertificatVérifieFichierSignatureBuffer Checks the correspondence between a signature and a file. The signature was stored as a Buffer variable.
MyCertificate is Certificate
MyCertificate = CertificateSelect()
IF MyCertificate.Name = "" THEN
RETURN
END
IF MyCertificate.ValidForSignature = False THEN
Info("The selected certificate cannot be used to generate a signature.")
RETURN
END
bufSignature is Buffer
bufSignature = CertificateSignFile(FullFileName, MyCertificate)
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 the 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.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|