Closed
Bug 51883
Opened 24 years ago
Closed 24 years ago
NSS_CMSSignedData_CreateCertsOnly doesn't work
Categories
(NSS :: Libraries, defect, P3)
Tracking
(Not tracked)
People
(Reporter: savri, Assigned: bugz)
Details
Asavari Ukidve wrote: > I tried debugging the creating of 'certsonly'. If I don't set > signer info, NSS_CMSSignedData_Encode_BeforeStart(NSSCMSSignedData *sigd) > called by NSS_CMSMessage_Encoder_start, bails out while executing the follwoing code : > /* prepare all the SignerInfos */ > for (i = 0; signerinfos[i] != NULL; i++) { > signerinfo = signerinfos[i]; > > Since there is no signer info. That's a bug. It should handle this gracefully. There should be an "if (signerinfos)" around this code. > However, if I set the signer info, NSS_CMSSignedData_Encode_AfterData, > called by Encoder_Finish, bails out while trying to handle the digests > because there are NO digests since there is no data. > > /* prepare all the SignerInfos */ > for (i = 0; signerinfos[i] != NULL; i++) { > signerinfo = signerinfos[i]; > > /* find correct digest for this signerinfo */ > digestalgtag = NSS_CMSSignerInfo_GetDigestAlgTag(signerinfo); > n = NSS_CMSAlgArray_GetIndexByAlgTag(sigd->digestAlgorithms, digestalgta > g); > if (n < 0 || sigd->digests == NULL || sigd->digests[n] == NULL) { > /* oops - digest not found */ > PORT_SetError(SEC_ERROR_DIGEST_NOT_FOUND); > goto loser; > ------------ Executes the above lines ----------------- That's another bug. The code should handle these special cases. Christian
*** This bug has been marked as a duplicate of 51882 ***
Status: UNCONFIRMED → RESOLVED
Closed: 24 years ago
Resolution: --- → DUPLICATE
Verified dupe of bug 51882 (same bug, same reporter, same comments....)
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•