Hi,

I am new to OpenSSL.

I am trying to verify the compressed XML data, signed using PKCS#7. Then a four 
byte crc is appended to it and the whole data is now base64 encoded.
All the above is done using windows libraries. The verification works fine in 
windows.

Now I am trying to verify the above data(signed using windows libs) using 
OpenSSL.

The data is decoded from base64 to bytes, crc is verified. Then I try to use 
the command d2i_pkcs7 to create the PKCS7 structure which results in
the following error , error:0D0680A8:asn1 encoding 
routines:ASN1_CHECK_TLEN:wrong tag.

The code I am using to do this is as follows:

const unsigned char *q;
      q = (const unsigned char*)nBytes;
      PKCS7 *p7 = NULL; // I want to use this p7 structure in PKCS7_verify
      p7 = d2i_PKCS7(NULL, &q, nCountOfBytes);// error occurs here


where nBytes is a BYTE array storing the data. I don't have a clue what this 
error means, am I missing something here?

-Ujwal

Reply via email to