diff options
Diffstat (limited to 'chromium/third_party/nss/nss/lib/certdb/cert.h')
-rw-r--r-- | chromium/third_party/nss/nss/lib/certdb/cert.h | 32 |
1 files changed, 23 insertions, 9 deletions
diff --git a/chromium/third_party/nss/nss/lib/certdb/cert.h b/chromium/third_party/nss/nss/lib/certdb/cert.h index 7c6402d380d..4ebdf33649b 100644 --- a/chromium/third_party/nss/nss/lib/certdb/cert.h +++ b/chromium/third_party/nss/nss/lib/certdb/cert.h @@ -79,13 +79,6 @@ extern CERTRDN *CERT_CreateRDN(PLArenaPool *arena, CERTAVA *avas, ...); extern SECStatus CERT_CopyRDN(PLArenaPool *arena, CERTRDN *dest, CERTRDN *src); /* -** Destory an RDN object. -** "rdn" the RDN to destroy -** "freeit" if PR_TRUE then free the object as well as its sub-objects -*/ -extern void CERT_DestroyRDN(CERTRDN *rdn, PRBool freeit); - -/* ** Add an AVA to an RDN. ** "rdn" the RDN to add to ** "ava" the AVA to add @@ -1218,6 +1211,7 @@ CERT_MatchUserCert(CERTCertDBHandle *handle, CERTCertList * CERT_NewCertList(void); +/* free the cert list and all the certs in the list */ void CERT_DestroyCertList(CERTCertList *certs); @@ -1225,16 +1219,26 @@ CERT_DestroyCertList(CERTCertList *certs); void CERT_RemoveCertListNode(CERTCertListNode *node); +/* equivalent to CERT_AddCertToListTailWithData(certs, cert, NULL) */ SECStatus CERT_AddCertToListTail(CERTCertList *certs, CERTCertificate *cert); +/* equivalent to CERT_AddCertToListHeadWithData(certs, cert, NULL) */ SECStatus CERT_AddCertToListHead(CERTCertList *certs, CERTCertificate *cert); +/* + * The new cert list node takes ownership of "cert". "cert" is freed + * when the list node is removed. + */ SECStatus CERT_AddCertToListTailWithData(CERTCertList *certs, CERTCertificate *cert, void *appData); +/* + * The new cert list node takes ownership of "cert". "cert" is freed + * when the list node is removed. + */ SECStatus CERT_AddCertToListHeadWithData(CERTCertList *certs, CERTCertificate *cert, void *appData); @@ -1493,15 +1497,25 @@ CERT_UnlockCertTrust(const CERTCertificate *cert); /* * Digest the cert's subject public key using the specified algorithm. + * NOTE: this digests the value of the BIT STRING subjectPublicKey (excluding + * the tag, length, and number of unused bits) rather than the whole + * subjectPublicKeyInfo field. + * * The necessary storage for the digest data is allocated. If "fill" is * non-null, the data is put there, otherwise a SECItem is allocated. * Allocation from "arena" if it is non-null, heap otherwise. Any problem * results in a NULL being returned (and an appropriate error set). */ extern SECItem * -CERT_GetSPKIDigest(PLArenaPool *arena, const CERTCertificate *cert, - SECOidTag digestAlg, SECItem *fill); +CERT_GetSubjectPublicKeyDigest(PLArenaPool *arena, const CERTCertificate *cert, + SECOidTag digestAlg, SECItem *fill); +/* + * Digest the cert's subject name using the specified algorithm. + */ +extern SECItem * +CERT_GetSubjectNameDigest(PLArenaPool *arena, const CERTCertificate *cert, + SECOidTag digestAlg, SECItem *fill); SECStatus CERT_CheckCRL(CERTCertificate* cert, CERTCertificate* issuer, const SECItem* dp, PRTime t, void* wincx); |