Index: nss/lib/certdb/cert.h |
=================================================================== |
--- nss/lib/certdb/cert.h (revision 239365) |
+++ nss/lib/certdb/cert.h (working copy) |
@@ -1218,6 +1218,7 @@ |
CERTCertList * |
CERT_NewCertList(void); |
+/* free the cert list and all the certs in the list */ |
void |
CERT_DestroyCertList(CERTCertList *certs); |
@@ -1225,16 +1226,26 @@ |
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 +1504,25 @@ |
/* |
* 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); |