Bob,
In libsrc\hilevel\sm_Sign.cpp, line 93 says :
***************************************
// It is expected that at least one session is valid for processing (as many
// SignerInfos will be added to the resulting SignedData ASN.1 structure as
// there are flagged sessions in the pCsmime structure).
***************************************
I wonder that it means I have to set the "m_pCSInsts->SetUseThis" to true but
even if I use the UseAll() function, the SignerInfos aren't
added. I send the input file I use and the output file I get. Please tell me
what's wrong here :
***************************************
CSM_Buffer *m_pBuf=new CSM_Buffer("input");
CSM_MsgToSign sig(m_pBuf);
sig.SetEncapContent(m_pBuf,CSM_Content::CONTENT_DATA_DATA);
CSMIME pCsmime;
CSM_AppLogin AppLog("libsm_free3DLL","sm_free3DLL DSAFreeGroup1User2.out
dsaFreeGroup1_User2X_8.dat ElmoRocks sm_FREE3");
if (pCsmime.m_pCSInsts && AppLog.m_pCSInsts)
{
pCsmime.m_pCSInsts->AppendL(AppLog.m_pCSInsts);
sm_CfgClearLogin(AppLog);// Prevent destruction
// since we took memory.
}
else if (AppLog.m_pCSInsts) // is there something to add.
{
pCsmime.m_pCSInsts = AppLog.m_pCSInsts;
AppLog.m_pCSInsts = NULL;
}
pCsmime.UseAll();
SM_RET_VAL lStatus = SM_NO_ERROR;
lStatus=sig.Sign(&pCsmime);
printf("error %d\n",lStatus);
CSM_Buffer *pbufContent = sig.GetEncodedContentInfo();
pbufContent->ConvertMemoryToFile("output");
delete pbufContent;
delete m_pBuf;
***************************************
(See attached file: input)(See attached file: output)
Attachment:
input
Description: Binary data
Attachment:
output
Description: Binary data