[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Verify message

I'm trying to verify a multi-part signed message and I'm getting the following error: "encapsulated content digest != message digest attribute"

I tried using the example provided in the sfl_guide3.doc document. I used the following for the encapsulated content:
Content-Type: Text/Plain
Content-Transfer-Encoding: 7bit
Content-Description: text, unencoded

SignedData5.in Content.

This is a FREE CTI Test content with Elmer Fudd DSA Cert AND Bugs Bunny Certs.
It also handles the alternative API calls for SignedData, so it contains a number of
additional keywords (including content in a file).

Here's my code...

CSM_Buffer bufMessage(encapcontent, length);

		CSM_ContentInfoMsg contentInfo;
			CSM_MsgToVerify msg;

			// Create an empty list of CounterSignature Signer IDs
			CSM_RecipientIDLst *pCSSIDNoCertsLst =
				new CSM_RecipientIDLst;

			long lRet = 0L;
			CSM_Content content(&bufMessage);
			if ((lRet = msg.PreProc(pCSMIME,
								pCSSIDNoCertsLst)) == SM_NO_ERROR)
				// set the encapsulated content and the content type
				long l2 = msg.Verify(pCSMIME);

Verify is throwing an exception after the following line in sm_MsgSignerInfo.cpp:

               if (pMessageDigest->Compare( encapContentDigest ) != 0)

I also tried to use Outlook Express to generate the SignerInfo with the same results.

Any help would be greatly appreciated.


Bob Smith

Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com