|
|
|
|
CertificateSignExecutable( Función) Firma un archivo ejecutable con una Certificate. La firma está incluida en el archivo. // Open the certificate picker of Windows MyCertificate is Certificate MyCertificate = CertificateSelect() // Cancelation or error IF MyCertificate = Null THEN RETURN END // If the selected certificate is valid for signing IF NOT MyCertificate.ValidForSignature THEN Info("The selected certificate cannot be used to generate a signature.") RETURN END // Retrieve the buffer containing the signature IF NOT CertificateSignExecutable(sFullFileName, MyCertificate) THEN Error("Error while signing the certificate:" + CR + ErrorInfo()) END
Sintaxis
<Result> = CertificateSignExecutable(<Executable> , <Certificate> [, <Description> [, <Algorithm>]])
<Result>: booleano - True si el ejecutable fue firmado,
- False en caso contrario. Para obtener más información sobre el error, utilice la función ErrorInfo con la constante errMessage.
<Executable>: Cadena de caracteres Nombre completo del archivo ejecutable a firmar. <Certificate>: Variable de tipo Certificate Nombre de la variable de tipo Certificate que contiene el Certificate que se utilizará para firmar el ejecutable. <Description>: Cadena de caracteres opcional Texto mostrado por la ventana UAC cuando se ejecuta el ejecutable. <Algorithm>: Constante de tipo Integer Algoritmo de hash utilizado por la firma:
| | certSHA160 (Valor predeterminado) | Algoritmo también conocido como SHA1. | certSHA256 | Algoritmo también conocido como SHA2. Observación: Este algoritmo no es compatible con Windows Vista. El UAC no muestra ninguna información y el ejecutable puede ser ejecutado. |
Clasificación Lógica de negocio / UI: Lógica de negocio
Esta página también está disponible para…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|