RE: Verify message

"Bob Smith" <[email protected]>
Newsgroups gmane.ietf.sfl
Message-ID <[email protected]>
Thanks Robert,

I got the message from Outlook Express to work. It helped to look at the 
<CR><LF>. I was deleting the last <LF>.

On another note... If the first SignerInfo hash does not match the message 
hash then verify method throws an error, and it doesn't try to verify the 
other signers. Is there a way to have it verify the second signer?

Bob


>From: "Colestock, Robert" <[email protected]>
>To: 'Bob Smith' <[email protected]>
>CC: "Pawling, John" <[email protected]>
>Subject: RE: Verify message
>Date: Mon, 19 Jun 2000 17:21:41 -0400
>
>Bob:
>
>I have not looked too closely to the actual code, so if this comment does
>not help write back.  Any time you deal with actual SMTP messages, it is
>important that each line have an artificial <CR><LF> (actual ASCII codes,
>not the strings) at the end.  Outlook Express in particular does not save
>messages with these codes, but they are necessary to properly check the 
>hash
>codes (hence the failure).  I have some example programs that
>produce/consume MIME messages using the older MIME++ library you are 
>welcome
>to if you are interested; they provide the logic necessary to properly
>process all contents, perform the base64 decoding and call the appropriate
>SFL logic to encrypt,decrypt,sign,and verify messages to/from Outlook
>Express.
>
>Also, if you check the actual location where this check is performed, you
>will notice an "#ifdef" line you could temporarily modify to allow this
>error to be ignored and test further.
>
>Bob Colestock
>VDA
>
>-----Original Message-----
>From: Bob Smith [mailto:[email protected]]
>Sent: Sunday, June 18, 2000 3:02 PM
>To: [email protected]
>Subject: 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;
>		contentInfo.SetEncodedCI(buf);
>		if(contentInfo.IsSignedData())
>		{
>			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,
>
>&(contentInfo.AccessEncapContent()->m_content),
>
>pCSSIDNoCertsLst)) == SM_NO_ERROR)
>			{
>				// set the encapsulated content and the
>content type
>				msg.SetEncapContent(&bufMessage,
>					CSM_Content::CONTENT_DATA_DATA);
>				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.
>
>Thanks,
>
>Bob Smith
>
>________________________________________________________________________
>Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com

________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.