EldoS
Navigation
Web site
Support
Table Of Contents

Filter: C#  VB.NET  Pascal  ActiveX  DLL 


TElMessageVerifier.Verify

TElMessageVerifier     See also    


 

This method verifies digitally signed data

 
 

Declaration

[C#]
    virtual int Verify(byte[] InBuffer, ref byte[] OutBuffer, ref int OutSize);
    int Verify(byte[] InBuffer, int InStartIndex, int InSize, byte[] OutBufer, int OutStartIndex, ref int OutSize)
    int Verify(System.IO.Stream InStream, System.IO.Stream OutStream, long InCount /* = 0 */)

[VB.NET]
    Overridable Function Verify(ByVal InBuffer As Byte(), ByRef OutBuffer As Byte(), ByRef OutSize As Integer) As Integer
    Function Verify(ByVal InBuffer As Byte(), ByVal InStartIndex As Integer, ByVal InSize As Integer, ByVal OutBufer As Byte(), ByVal OutStartIndex As Integer, ByRef OutSize As Integer) As Integer
    Function Verify(ByVal InStream As System.IO.Stream, ByVal OutStream As System.IO.Stream, ByVal InCount As Long = 0) As Integer

[Pascal]
    function Verify(InBuffer : pointer; InSize : integer; OutBuffer : pointer; var OutSize : integer) : integer; overload; virtual;
    function Verify(InStream, OutStream : TStream; InCount : Int64 = 0;) : integer; overload;

[VB6]
    Sub IElMessageVerifierX.Verify(InBuffer As Byte(), OutBuffer As Byte())

[ActiveX]
    HRESULT _stdcall IElMessageVerifierX.Verify([in] VARIANT InBuffer, [out] VARIANT * OutBuffer );

[DLL]
    __stdcall int SBMessageVerifierVerify(HANDLE hVerifier, void* pInBuffer, int nInSize, void* pOutBuffer, int* nOutSize);
 
 

Parameters

  • [DLL]hVerifier - handle to the TElMessageVerifier object that was returned by Constructor
  • InBuffer (pInBuffer) - Pointer to PKCS#7 data which should be verified
  • InStartIndex - Starting index of the data to be verified in the InBuffer.
  • InSize (nInSize) - Size of the input data in bytes
  • OutBuffer (pOutBuffer) - Pointer to buffer where verified and unpacked data should be written
  • OutStartIndex - Starting index of the resulting data in the OutBuffer.
  • OutSize (nOutSize) - Size of the OutBuffer in bytes
  • InStream - Stream with data to be verified.
  • OutStream - Resulting stream.
  • InCount - Number of bytes to be read from InStream. If this parameter is 0 the data is read till the end of the stream.
    Default value is 0.
 
 

Return value

    0 if the verification process was completed successfully.
    one of the following error codes otherwise,

 

[C#] [Pascal] [ActiveX] [DLL] Value Description
SB_MESSAGE_ERROR_NO_ENCRYPTED_DATA 8193 (0x2001) Message doesn't contain encrypted data
SB_MESSAGE_ERROR_NO_CERTIFICATE 8194 (0x2002)
  • Decryption/Signature verification: Certificate which was used to encrypt/sign message was not found.
  • Encryption/Signing: Certificate storage is empty.
  • Signing: Certificate storage doesn't contain any certificate with corresponding private key.
  • Decryption: The required certificate is found but it doesn't contain the corresponding private key.
  • SB_MESSAGE_ERROR_KEY_DECRYPTION_FAILED 8195 (0x2003) TElMessageDecryptor was unable to decrypt the content encryption key. The high possibility that message is corrupted.
    SB_MESSAGE_ERROR_BUFFER_TOO_SMALL 8196 (0x2004) The buffer for output data is too small. Check the OutSize property to obtain the required buffer size.
    SB_MESSAGE_ERROR_CONTENT_DECRYPTION_FAILED 8197 (0x2005) TElMessageDecryptor was unable to decrypt the content. The high possibility that message is corrupted.
    SB_MESSAGE_ERROR_INVALID_FORMAT 8198 (0x2006) The message passed to Decrypt/Verify routine is not valid PKCS7 message.
    SB_MESSAGE_ERROR_NO_RECIPIENTS 8199 (0x2007) CertStorage is empty or contains invalid certificates.
    SB_MESSAGE_ERROR_UNSUPPORTED_ALGORITHM 8200 (0x2008)
  • TElMessageDecryptor/ElMessageVerifier: The incoming message contains data encrypted using unsupported algorithm
  • TElMessageEncryptor/ElMessageSigner: Algorithm or DigestAlgorithm property is set to invalid value
  • SB_MESSAGE_ERROR_ENCRYPTION_FAILED 8201 (0x2009) TElMessageEncryptor was unable to encrypt message due to internal error
    SB_MESSAGE_ERROR_INVALID_KEY_LENGTH 8202 (0x200A) Property BitsInKey is set to invalid value.
    SB_MESSAGE_ERROR_NO_SIGNED_DATA 8203 (0x200B) No signed data was found.
    SB_MESSAGE_ERROR_INVALID_SIGNATURE 8204 (0x200C) Signed message contains invalid digital signature. The high possibility that signature was corrupted.
    SB_MESSAGE_ERROR_INVALID_DIGEST 8205 (0x200D) Signed message contains invalid message digest. The high possibility that original message was tampered.
    SB_MESSAGE_ERROR_SIGNING_FAILED 8206 (0x200E) TElMessageSigner was unable to sign message due to internal error
    SB_MESSAGE_ERROR_INTERNAL_ERROR 8207 (0x200F) Internal error occured. Please contact EldoS support.
    SB_MESSAGE_ERROR_INVALID_MAC 8208 (0x2010) Signed message contains invalid MAC signature. The high possibility that signature was tampered.
    SB_MESSAGE_ERROR_UNSUPPORTED_SIGNATURE_TYPE 8209 (0x2011) Message signature is of an unsupported type.
    SB_MESSAGE_ERROR_INVALID_COUNTERSIGNATURE 8210 (0x2012) The countersignature is not valid.
    SB_MESSAGE_ERROR_DIGEST_NOT_FOUND 8211 (0x2013) Cannot obtain message digest.
    SB_MESSAGE_ERROR_UNSUPPORTED_DIGEST_ALGORITHM 8212 (0x2014) Digest value is computed via an unsupported digest algorithm
    SB_MESSAGE_ERROR_CANCELLED_BY_USER 8213 (0x2015) The action is cancelled by user.
    SB_MESSAGE_ERROR_VERIFICATION_FAILED 8214 (0x2016) This error is reported if any exception is rised during message verification.
    SB_MESSAGE_ERROR_DIGEST_CALCULATION_FAILED 8215 (0x2017) This error is reported if any exception is rised during digest calculation.
    SB_MESSAGE_ERROR_MAC_CALCULATION_FAILED 8216 (0x2018) This error is reported, when MAC calculation is failed.
    SB_MESSAGE_ERROR_TSPCLIENT_NOT_FOUND 8217 (0x2019) This error is reported, when there is no object associated with TSP client
    SB_MESSAGE_ERROR_BAD_TIMESTAMP 8218 (0x201A) This error is reported, if message time stamp does not succeed verification
    SB_MESSAGE_ERROR_KEYOP_FAILED_RSA 8219 (0x201B) This error is reported, when operation with RSA key has failed
    SB_MESSAGE_ERROR_KEYOP_FAILED_DSA 8220 (0x201C) This error is reported, when operation with DSA key has failed
    SB_MESSAGE_ERROR_KEYOP_FAILED_RSA_PSS 8221 (0x201D) This error is reported, when operation with RSA PSS key has failed
    Declared in
    [.NET] [Pascal]
    Namespace: SBMessages
    Assembly: SecureBlackbox
    Unit: SBMessages

     
     

    Description

        Use this method to verify the digital signature for a message. Message should be in PKCS#7-compatible format.

        Message is validated using certificates which it contains. If message does not contain the appropriate certificate, certificates from CertStorage are used.

        Check Certificates property after calling this method to get certificates which are included in message.

     
     

    See also:     CertStorage     Certificates     VerifyDetached     ErrorInfo    

     
    Contact Us | Terms of Use | Trademarks | Privacy Statement
    Copyright (c) 1998-2012, EldoS Corporation