ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / Certificate functions
  • Validity of certificate
  • 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
Creates the signature of a file. This signature can be stored in a Buffer variable or in a text file.
Example
WINDEVReports and QueriesUser code (UMC)
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)
 
// Save the signature in a file for a future check
fSaveBuffer(MySignatureFile, bufSignature)
Syntax
<Result> = CertificateSignFile(<File path> , <Certificate> [, <Signature file>])
<Result>: Buffer
Signature of the file. This buffer can be used later by CertificateCheckBufferSignatureFile to check the correspondence between the signature and the file.
<File path>: Character string
Name and full (or relative) path of the file for which a signature will be created.
<Certificate>: Certificate variable
Name of Certificate variable containing the certificate that will be used to create the signature of the file.
<Signature file>: Optional character string
Name and full (or relative) path of the file containing the signature. This file can be used later by CertificateCheckFileSignatureFile to check the correspondence between the signature and the file.
Remarks

Validity of certificate

Before signing a file, it is recommended to check the validity of the certificate (ValidForSignature property of the Certificate variable). This property is used to find out whether the certificate owns a private key as well as all the characteristics required to perform a signature. CertificateSignFile returns an error if this property is set to False.
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: wd300std.dll
Minimum version required
  • Version 16
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/05/2023

Send a report | Local help