RE: Broken constructors for CSM_MsgToVerify
"Colestock, Robert" <[email protected]> Fri, 2 Nov 2001 15:10:58 -0500
| Newsgroups | gmane.ietf.sfl |
|---|---|
| Message-ID | <[email protected]> |
John: The reason that the various CSM_MsgSignerInfos are not filled is due to the lack of a CSMIME (login list). Strictly speaking, this may not be necessary, but the way the code was written the login list must be present (for algorithm IDs) in order to setup the Verify operation. Since there must be at least 1 login in the list, this does not seem unreasonable. The reason for the constructors that do not require the CSMIME login list is to allow an application to perform the basic decode with access to the certificates if necessary. Sorry about the confusion. Bob Colestock VDA -----Original Message----- From: John Stark [mailto:[email protected]] Sent: Friday, November 02, 2001 1:41 PM To: [email protected] Subject: Broken constructors for CSM_MsgToVerify Erik Rissanen [mailto:[email protected]] wrote: > One more thing: Some of the overloaded versions of > CSM_MsgToVerify::CSM_MsgToVerify and CSM_MsgToVerify::PreProc do not process > the signerInfos so that they become available in > CSM_MsgToVerify::m_pSignerInfos. Is this a bug? > For instance: > > // Does not work: > CSM_ContentInfoMsg *pcim = new CSM_ContentInfoMsg(pSMIMEMsg); > CSM_MsgToVerify *pMsg = new CSM_MsgToVerify(pcim); > pMsg->PreProc(pAppLogin); > // pMsg->m_pSignerInfos == NULL now > > //Works: > // pci is SNACC ContentInfo with signedData in pci->content > CSM_MsgToVerify *pMsg = new CSM_MsgToVerify(pAppLogin, (CSM_Buffer *) > pci->content.value); > pMsg->PreProc(pAppLogin); > // pMsg->m_pSignerInfos != NULL now I have been trying to write some verify code using SFL 1.9 and have come across the same problem. It's obvious from the source. In sm_Verify.cpp revision 1.89, the only place where the m_pSignerInfos array is constructed is in the code at line 343 in the PreProc() method that takes only a blob as parameter. This method is also called by: 1. the constructor that takes a pCSMIME and a blob (CSM_Buffer *). 2. the Verify method that takes a pCSMIME and a blob. 3. the PreProc method that takes a pCSMIME, a blob and an optional recipient list. The constructors that take a CSM_ContentInfoMsg pointer or a CSM_Content pointer don't call it. This looks to me to be a mistake. Is there going to be a new release soon that fixes this? John Stark [email protected]