summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornelson%bolyard.com <devnull@localhost>2008-02-06 02:03:48 +0000
committernelson%bolyard.com <devnull@localhost>2008-02-06 02:03:48 +0000
commit2b46dd366e29c1a6e8687249d3a2e0016e997fc7 (patch)
treea9f11dfc70215004bcd8f8bb42027bf605f6be85
parentba007ca38f3938f4203d4073cd6dcced203cfde1 (diff)
downloadnss-hg-2b46dd366e29c1a6e8687249d3a2e0016e997fc7.tar.gz
Bug 291384. Remove two dead functions from PK11wrap. r=rrelyea,alexei.volkov
-rw-r--r--security/nss/lib/pk11wrap/pk11akey.c28
-rw-r--r--security/nss/lib/pk11wrap/pk11cert.c35
2 files changed, 6 insertions, 57 deletions
diff --git a/security/nss/lib/pk11wrap/pk11akey.c b/security/nss/lib/pk11wrap/pk11akey.c
index 05d843dfa..e08b35086 100644
--- a/security/nss/lib/pk11wrap/pk11akey.c
+++ b/security/nss/lib/pk11wrap/pk11akey.c
@@ -1879,32 +1879,10 @@ PK11_MakeIDFromPubKey(SECItem *pubKeyData)
return certCKA_ID;
}
-SECItem *
-PK11_GetKeyIDFromPrivateKey(SECKEYPrivateKey *key, void *wincx)
-{
- CK_ATTRIBUTE theTemplate[] = {
- { CKA_ID, NULL, 0 },
- };
- int tsize = sizeof(theTemplate)/sizeof(theTemplate[0]);
- SECItem *item = NULL;
- CK_RV crv;
-
- crv = PK11_GetAttributes(NULL,key->pkcs11Slot,key->pkcs11ID,
- theTemplate,tsize);
- if (crv != CKR_OK) {
- PORT_SetError( PK11_MapError(crv) );
- goto loser;
- }
-
- item = PORT_ZNew(SECItem);
- if (item) {
- item->data = (unsigned char*) theTemplate[0].pValue;
- item->len = theTemplate[0].ulValueLen;
- }
+/* Looking for PK11_GetKeyIDFromPrivateKey?
+ * Call PK11_GetLowLevelKeyIDForPrivateKey instead.
+ */
-loser:
- return item;
-}
SECItem *
PK11_GetLowLevelKeyIDForPrivateKey(SECKEYPrivateKey *privKey)
diff --git a/security/nss/lib/pk11wrap/pk11cert.c b/security/nss/lib/pk11wrap/pk11cert.c
index 5643176b8..ae7ae6bc3 100644
--- a/security/nss/lib/pk11wrap/pk11cert.c
+++ b/security/nss/lib/pk11wrap/pk11cert.c
@@ -2225,39 +2225,10 @@ PK11_FindCertInSlot(PK11SlotInfo *slot, CERTCertificate *cert, void *wincx)
return pk11_getcerthandle(slot,cert,theTemplate,tsize);
}
-SECItem *
-PK11_GetKeyIDFromCert(CERTCertificate *cert, void *wincx)
-{
- CK_OBJECT_HANDLE handle;
- PK11SlotInfo *slot = NULL;
- CK_ATTRIBUTE theTemplate[] = {
- { CKA_ID, NULL, 0 },
- };
- int tsize = sizeof(theTemplate)/sizeof(theTemplate[0]);
- SECItem *item = NULL;
- CK_RV crv;
-
- handle = PK11_FindObjectForCert(cert,wincx,&slot);
- if (handle == CK_INVALID_HANDLE) {
- goto loser;
- }
-
- crv = PK11_GetAttributes(NULL,slot,handle,theTemplate,tsize);
- if (crv != CKR_OK) {
- PORT_SetError( PK11_MapError(crv) );
- goto loser;
- }
-
- item = PORT_ZNew(SECItem);
- if (item) {
- item->data = (unsigned char*) theTemplate[0].pValue;
- item->len = theTemplate[0].ulValueLen;
- }
+/* Looking for PK11_GetKeyIDFromCert?
+ * Use PK11_GetLowLevelKeyIDForCert instead.
+ */
-loser:
- PK11_FreeSlot(slot);
- return item;
-}
struct listCertsStr {
PK11CertListType type;