procedure CheckSignature(const Data: TBytes); overload;

procedure CheckSignature(InStream: TStream; TmpDecodedStream: TStream = nil); overload;

procedure CheckSignature(const FileName: string; const TmpFileName: string = ''); overload;

 

Description

The CheckSignature method verifies the digital signature on the signed CMS/PKCS #7 message by using the certificate specified in the Certificate property. The method finds the signature corresponding to the specified certificate and verifies it. If there are signed attributes included with the message, these attributes are also verified.

 

Data is an array of byte values that represents the CMS/PKCS #7 message to be verified.

InStream is a TStream object that represents the CMS/PKCS #7 message to be verified.

FileName is a name of the file that contains the CMS/PKCS #7 message to be verified.

TmpDecodedStream is a TStream object that will contain temporary data in case if source a format of CMS/PKCS #7 message is the PEM or S/MIME format. If the TmpDecodedStream parameter is nil, the TMemoryStream object will be created instead.

TmpFileName is a name of the file that will contain temporary data in case if a source format of CMS/PKCS #7 message is the PEM or S/MIME format. If the TmpFileName parameter is empty, the TMemoryStream object will be created for temporary data.

 

CheckSignature raises an exception if the verification of a digital signature fails.

CheckSignature resets all properties of the SignedData object that stores the information about the processed CMS/PKCS #7 message.

 

See Also

Sign

SignedData

SecureBridge Components, Copyright © 2007-2024 Devart. All Rights Reserved. Provide Feedback Visit Forum Request Support