• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10.1/Security-57031.1.35/libsecurity_smime/Security/

Lines Matching refs:digests

132     /* we assume that we have precomputed digests if there is a list of algorithms, and */
134 if (sigd->digestAlgorithms != NULL && sigd->digests != NULL) {
136 if (sigd->digests[i] == NULL)
140 haveDigests = PR_TRUE; /* yes: we must have all the digests */
164 /* but we were supposed to have all the digests already... */
183 (void **)sigd->digests);
196 /* set up the digests */
235 SecAsn1Item **digests = NULL;
237 rv = SecCmsDigestContextFinishMultiple(cinfo->digcx, &digestalgs, &digests);
240 if (digestalgs && digests) {
241 rv = SecCmsSignedDataSetDigests(sigd, digestalgs, digests);
259 if (n < 0 || sigd->digests == NULL || sigd->digests[n] == NULL) {
274 rv = SecCmsSignerInfoSign(signerinfo, sigd->digests[n], contentType);
369 /* set up the digests, if we have digest algorithms, no digests yet, and content is attached */
370 if (sigd->digestAlgorithms != NULL && sigd->digests == NULL /* && sigd->contentInfo.content.pointer != NULL*/) {
371 /* if digests are already there, do nothing */
392 SecAsn1Item * *digests = NULL;
394 rv = SecCmsDigestContextFinishMultiple(sigd->contentInfo.digcx, &digestalgs, &digests);
397 rv = SecCmsSignedDataSetDigests(sigd, digestalgs, digests);
504 * XXX the digests need to be passed in BETWEEN the decoding and the verification in case
512 * The digests were either calculated during decoding (and are stored in the
541 if (!sigd->digests) {
634 * SecCmsSignedDataHasDigests - see if we have digests in place
639 return (sigd->digests != NULL);
758 return (idx >= 0)?(sigd->digests)[idx]:NULL;
766 SecAsn1Item * *digests;
768 if (SecCmsDigestContextFinishMultiple(digestContext, &digestalgs, &digests) != SECSuccess)
770 if (SecCmsSignedDataSetDigests(sigd, digestalgs, digests) != SECSuccess)
779 * SecCmsSignedDataSetDigests - set a signedData's digests member
782 * "digests" - array of digests corresponding to the digest algorithms
787 SecAsn1Item * *digests)
799 if (sigd->digests && sigd->digests[0])
802 /* we assume that the digests array is just not there yet */
804 PORT_Assert(sigd->digests == NULL);
805 if (sigd->digests != NULL) {
811 if (sigd->digests == NULL) {
813 sigd->digests = PORT_ArenaZAlloc(sigd->contentInfo.cmsg->poolp, (cnt + 1) * sizeof(SecAsn1Item *));
814 if (sigd->digests == NULL) {
829 if ((sigd->digests[i] = SECITEM_AllocItem(sigd->contentInfo.cmsg->poolp, NULL, 0)) == NULL ||
830 SECITEM_CopyItem(sigd->contentInfo.cmsg->poolp, sigd->digests[i], digests[idx]) != SECSuccess)
863 if (sigd->digests == NULL) {
865 sigd->digests = PORT_ArenaZAlloc(sigd->contentInfo.cmsg->poolp, (cnt + 1) * sizeof(SecAsn1Item *));
866 if (sigd->digests == NULL) {
882 sigd->digests[n] = digest;
913 SecCmsArrayAdd(poolp, (void ***)&(sigd->digests), (void *)digest) != SECSuccess)
936 return (n < 0) ? NULL : sigd->digests[n];