diff options
author | julien.pierre.boogz%sun.com <devnull@localhost> | 2008-02-06 00:32:32 +0000 |
---|---|---|
committer | julien.pierre.boogz%sun.com <devnull@localhost> | 2008-02-06 00:32:32 +0000 |
commit | 77007f7086c9c793e98e6cac534996a91f480c21 (patch) | |
tree | 02883f824a0eee29b9dde1d5d1a72bba6f4c374e | |
parent | f6541bf4ab6e689a13326b9565f6374b7dd0fdfb (diff) | |
download | nss-hg-77007f7086c9c793e98e6cac534996a91f480c21.tar.gz |
Fix for bug 415007 . Remove dead code - PK11_FindCertFromDERSubjectAndNickname. r=rrelyea
-rw-r--r-- | security/nss/lib/pk11wrap/pk11cert.c | 40 | ||||
-rw-r--r-- | security/nss/lib/pk11wrap/pk11priv.h | 4 |
2 files changed, 0 insertions, 44 deletions
diff --git a/security/nss/lib/pk11wrap/pk11cert.c b/security/nss/lib/pk11wrap/pk11cert.c index 4a76afb61..59906f2df 100644 --- a/security/nss/lib/pk11wrap/pk11cert.c +++ b/security/nss/lib/pk11wrap/pk11cert.c @@ -1997,46 +1997,6 @@ PK11_FindCertFromDERCertItem(PK11SlotInfo *slot, SECItem *inDerCert, return c ? STAN_GetCERTCertificateOrRelease(c) : NULL; } -/* mcgreer 3.4 -- nobody uses this, ignoring */ -/* - * return the certificate associated with a derCert - */ -CERTCertificate * -PK11_FindCertFromDERSubjectAndNickname(PK11SlotInfo *slot, - CERTCertificate *cert, - char *nickname, void *wincx) -{ - CK_OBJECT_CLASS certClass = CKO_CERTIFICATE; - CK_ATTRIBUTE theTemplate[] = { - { CKA_SUBJECT, NULL, 0 }, - { CKA_LABEL, NULL, 0 }, - { CKA_CLASS, NULL, 0 } - }; - /* if you change the array, change the variable below as well */ - int tsize = sizeof(theTemplate)/sizeof(theTemplate[0]); - CK_OBJECT_HANDLE certh; - CK_ATTRIBUTE *attrs = theTemplate; - SECStatus rv; - - PK11_SETATTRS(attrs, CKA_SUBJECT, cert->derSubject.data, - cert->derSubject.len); attrs++; - PK11_SETATTRS(attrs, CKA_LABEL, nickname, PORT_Strlen(nickname)); - PK11_SETATTRS(attrs, CKA_CLASS, &certClass, sizeof(certClass)); - - /* - * issue the find - */ - rv = pk11_AuthenticateUnfriendly(slot, PR_TRUE, wincx); - if (rv != SECSuccess) return NULL; - - certh = pk11_getcerthandle(slot,cert,theTemplate,tsize); - if (certh == CK_INVALID_HANDLE) { - return NULL; - } - - return PK11_MakeCertFromHandle(slot, certh, NULL); -} - /* * import a cert for a private key we have already generated. Set the label * on both to be the nickname. diff --git a/security/nss/lib/pk11wrap/pk11priv.h b/security/nss/lib/pk11wrap/pk11priv.h index 616a1476a..ae5c638ed 100644 --- a/security/nss/lib/pk11wrap/pk11priv.h +++ b/security/nss/lib/pk11wrap/pk11priv.h @@ -161,10 +161,6 @@ SECStatus PK11_TraverseCertsForSubject(CERTCertificate *cert, SECStatus(*callback)(CERTCertificate *, void *), void *arg); CERTCertificate *PK11_FindCertFromDERCertItem(PK11SlotInfo *slot, SECItem *derCert, void *wincx); -CERTCertificate *PK11_FindCertFromDERSubjectAndNickname( - PK11SlotInfo *slot, - CERTCertificate *cert, char *nickname, - void *wincx); SECStatus PK11_GetKEAMatchedCerts(PK11SlotInfo *slot1, PK11SlotInfo *slot2, CERTCertificate **cert1, CERTCertificate **cert2); SECStatus PK11_TraverseCertsInSlot(PK11SlotInfo *slot, |