diff options
author | wtchang%redhat.com <devnull@localhost> | 2005-03-16 22:40:35 +0000 |
---|---|---|
committer | wtchang%redhat.com <devnull@localhost> | 2005-03-16 22:40:35 +0000 |
commit | 274a4bd87ec8ed7af6a5d2d0fe5090ee02e4ddf8 (patch) | |
tree | 7eb7b7159efbc799acbf3fb946d6fb75f6ffc626 | |
parent | 3792f3db2ca80bf0bc10829616593a7afe146613 (diff) | |
download | nss-hg-274a4bd87ec8ed7af6a5d2d0fe5090ee02e4ddf8.tar.gz |
Bugzilla Bug 286302: made PK11_CreateSymKey static and renamed it
pk11_CreateSymKey. r=nelsonb.
Modified Files: pk11priv.h pk11skey.c
-rw-r--r-- | security/nss/lib/pk11wrap/pk11priv.h | 2 | ||||
-rw-r--r-- | security/nss/lib/pk11wrap/pk11skey.c | 20 |
2 files changed, 10 insertions, 12 deletions
diff --git a/security/nss/lib/pk11wrap/pk11priv.h b/security/nss/lib/pk11wrap/pk11priv.h index f54bd35ac..69845b5f5 100644 --- a/security/nss/lib/pk11wrap/pk11priv.h +++ b/security/nss/lib/pk11wrap/pk11priv.h @@ -129,8 +129,6 @@ CK_MECHANISM_TYPE PK11_GetKeyGenWithSize(CK_MECHANISM_TYPE type, int size); /********************************************************************** * Symetric, Public, and Private Keys **********************************************************************/ -PK11SymKey *PK11_CreateSymKey(PK11SlotInfo *slot, - CK_MECHANISM_TYPE type, PRBool owner, void *wincx); /* Key Generation specialized for SDR (fixed DES3 key) */ PK11SymKey *PK11_GenDES3TokenKey(PK11SlotInfo *slot, SECItem *keyid, void *cx); SECKEYPublicKey *PK11_ExtractPublicKey(PK11SlotInfo *slot, KeyType keyType, diff --git a/security/nss/lib/pk11wrap/pk11skey.c b/security/nss/lib/pk11wrap/pk11skey.c index 169efeae8..6398434f5 100644 --- a/security/nss/lib/pk11wrap/pk11skey.c +++ b/security/nss/lib/pk11wrap/pk11skey.c @@ -116,8 +116,8 @@ PK11_CleanKeyList(PK11SlotInfo *slot) * Slot is the slot to create the key in. * type is the mechanism type */ -PK11SymKey * -PK11_CreateSymKey(PK11SlotInfo *slot, CK_MECHANISM_TYPE type, PRBool owner, +static PK11SymKey * +pk11_CreateSymKey(PK11SlotInfo *slot, CK_MECHANISM_TYPE type, PRBool owner, void *wincx) { @@ -252,7 +252,7 @@ PK11_SymKeyFromHandle(PK11SlotInfo *slot, PK11SymKey *parent, PK11Origin origin, return NULL; } - symKey = PK11_CreateSymKey(slot,type,owner,wincx); + symKey = pk11_CreateSymKey(slot,type,owner,wincx); if (symKey == NULL) { return NULL; } @@ -329,7 +329,7 @@ pk11_ImportSymKeyWithTempl(PK11SlotInfo *slot, CK_MECHANISM_TYPE type, PK11SymKey * symKey; SECStatus rv; - symKey = PK11_CreateSymKey(slot,type,!isToken,wincx); + symKey = pk11_CreateSymKey(slot,type,!isToken,wincx); if (symKey == NULL) { return NULL; } @@ -827,11 +827,11 @@ PK11_TokenKeyGen(PK11SlotInfo *slot, CK_MECHANISM_TYPE type, SECItem *param, return NULL; } - symKey = PK11_CreateSymKey(bestSlot, type, !isToken, wincx); + symKey = pk11_CreateSymKey(bestSlot, type, !isToken, wincx); PK11_FreeSlot(bestSlot); } else { - symKey = PK11_CreateSymKey(slot, type, !isToken, wincx); + symKey = pk11_CreateSymKey(slot, type, !isToken, wincx); } if (symKey == NULL) return NULL; @@ -1261,7 +1261,7 @@ pk11_DeriveWithTemplate( PK11SymKey *baseKey, CK_MECHANISM_TYPE derive, /* get our key Structure */ - symKey = PK11_CreateSymKey(slot,target,!isPerm,baseKey->cx); + symKey = pk11_CreateSymKey(slot,target,!isPerm,baseKey->cx); if (symKey == NULL) { return NULL; } @@ -1328,7 +1328,7 @@ PK11_PubDerive(SECKEYPrivateKey *privKey, SECKEYPublicKey *pubKey, } /* get our key Structure */ - symKey = PK11_CreateSymKey(slot,target,PR_TRUE,wincx); + symKey = pk11_CreateSymKey(slot,target,PR_TRUE,wincx); if (symKey == NULL) { return NULL; } @@ -1497,7 +1497,7 @@ PK11_PubDeriveWithKDF(SECKEYPrivateKey *privKey, SECKEYPublicKey *pubKey, #endif /* get our key Structure */ - symKey = PK11_CreateSymKey(slot,target,PR_TRUE,wincx); + symKey = pk11_CreateSymKey(slot,target,PR_TRUE,wincx); if (symKey == NULL) { return NULL; } @@ -1786,7 +1786,7 @@ pk11_AnyUnwrapKey(PK11SlotInfo *slot, CK_OBJECT_HANDLE wrappingKey, } /* get our key Structure */ - symKey = PK11_CreateSymKey(slot,target,!isPerm,wincx); + symKey = pk11_CreateSymKey(slot,target,!isPerm,wincx); if (symKey == NULL) { if (param_free) SECITEM_FreeItem(param_free,PR_TRUE); return NULL; |