AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Funciones WLanguage / Funciones estándar / Funciones de certificados
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
Extracts a certificate from a signature buffer or from a print duplicate.
Ejemplo
// Extract a certificate from the buffer
MyCertificate is Certificate 
MyCertificate = CertificateExtract(buffSignature, certificateFromBuffer)

// Checks whether the signature does not correspond 
// or whether the buffer is incorrect (details in ErrorInfo)
IF MyCertificate = Null THEN
	Error("Error while retrieving the certificate." + CR + ErrorInfo())
	RETURN
END

// Displays the trust level of the certificate
SWITCH MyCertificate.Reliability
	CASE certificateOk: Info("Valid certificate")
	CASE certificateInvalid: Info("Certificate invalid")
	CASE certificateUntrusted: Info("Trusted root of untrusted certificate")
	CASE certificateExpired: Info("Validity dates of expired certificate")
END
Sintaxis
<Result> = CertificateExtract(<Signed Element> [, <Option>])
<Result>: Certificate variable
Certificate variable extracted from the element containing the signature.
<Signed Element>: Buffer variable or character string
Corresponds to:
<Option>: Optional Integer constant
Specifies the type of element used:
certificateFromBuffer
(Default value)
The element is a signature buffer.
certificateFromDuplicateThe element is the path of a signed duplicate file.
Componente: wd300std.dll
Versión mínima requerida
  • Versión 16
Esta página también está disponible para…
Comentarios
Exemplo CertificateExtract
MyExtractedCertificate is Certificate
HReset(CERTIFICADO)
IF HReadSeek(CERTIFICADO,AGRONOMO_ID,EDT_AGRONOMO_ID,hIdentical) = True THEN

EDT_CertificadoEncodado = CERTIFICADO.CERTIFICADO_ENCODE

bufSignature is Buffer = Decode(CERTIFICADO.CERTIFICADO_ENCODE,encodeBASE64)

MyExtractedCertificate = CertificateExtract(bufSignature,certificateFromBuffer)

IF MyExtractedCertificate = Null THEN
RESULT False
END

IF MyExtractedCertificate..EndValidityDate<DateSys() THEN
Info("Certificado Vencido")
else

MySignature is pdfSignature
MySignature..Certificate = MyExtractedCertificate
MySignature..Caption = " por:" + MyExtractedCertificate..Name + " em " + DateToString(DateSys())
MySignature..Height = 264 //xAlturaTexto
MySignature..Width = 167 //xLarguraTexto
MySignature..X = 1 //xPosicaoTextoX
MySignature..Y = 15 //xPosicaoTextoY
MySignature..VerticalAlignment=iBottom
MySignature..HorizontalAlignment=iRight
END


end
Boller
03 02 2023

Última modificación: 27/03/2025

Señalar un error o enviar una sugerencia | Ayuda local