X509CertCmsVerify (FUN)ΒΆ
FUNCTION X509CertCmsVerify : RTS_IEC_RESULT
Verifies a CMS signature. This function can handle both (detached and attached) signatures. The signers certificate has to be located in the CMS container. Otherwise the verify will fail. The signers certificate is always verified against the trusted certificate store on the PLC.
- InOut:
Scope
Name
Type
Comment
Return
X509CertCmsVerifyRTS_IEC_RESULTERR_OK if the signature is valid and the signer was trustworthy. ERR_SIGNATURE_MISMATCH if the signature is invalid and / or the signer was not trustworthy. ERR_PARAMETER if the given parameters are not consistent.
Input
hCertStoreRTS_IEC_HANDLEHandle to the certificate store.
pCmsPOINTER TO RtsByteString
Pointer to a byte string storing the CMS container.
encodingRtsCertEncodingEncoding of the CMS container.
pInDataPOINTER TO RtsByteString
Used only if the signature is detached. In this case this byte string has to store the data to be verified
pOutDataPOINTER TO RtsByteString
Pointer to a byte string where to store the extracted data.