diff options
author | rrelyea%redhat.com <devnull@localhost> | 2010-12-04 19:10:06 +0000 |
---|---|---|
committer | rrelyea%redhat.com <devnull@localhost> | 2010-12-04 19:10:06 +0000 |
commit | 9d1b24d64ffea1a7f5175567c5fedd98e9710ef3 (patch) | |
tree | 048742d783e6019106a8c3ace6d706f72956186e /security/nss/lib/pk11wrap | |
parent | d51c5d8625e05718ac632a9f0ca790278aaaf57d (diff) | |
download | nss-hg-9d1b24d64ffea1a7f5175567c5fedd98e9710ef3.tar.gz |
Bug 609076 - Expose a PKCS#11 interface for J-PAKE in Softoken
patch by bsmith
r=rrelyea
Diffstat (limited to 'security/nss/lib/pk11wrap')
-rw-r--r-- | security/nss/lib/pk11wrap/pk11pub.h | 6 | ||||
-rw-r--r-- | security/nss/lib/pk11wrap/pk11skey.c | 16 |
2 files changed, 11 insertions, 11 deletions
diff --git a/security/nss/lib/pk11wrap/pk11pub.h b/security/nss/lib/pk11wrap/pk11pub.h index da0b10e5c..a47b73750 100644 --- a/security/nss/lib/pk11wrap/pk11pub.h +++ b/security/nss/lib/pk11wrap/pk11pub.h @@ -403,6 +403,12 @@ PK11SymKey * PK11_DeriveWithFlagsPerm( PK11SymKey *baseKey, CK_MECHANISM_TYPE derive, SECItem *param, CK_MECHANISM_TYPE target, CK_ATTRIBUTE_TYPE operation, int keySize, CK_FLAGS flags, PRBool isPerm); +PK11SymKey * +PK11_DeriveWithTemplate( PK11SymKey *baseKey, CK_MECHANISM_TYPE derive, + SECItem *param, CK_MECHANISM_TYPE target, CK_ATTRIBUTE_TYPE operation, + int keySize, CK_ATTRIBUTE *userAttr, unsigned int numAttrs, + PRBool isPerm); + PK11SymKey *PK11_PubDerive( SECKEYPrivateKey *privKey, SECKEYPublicKey *pubKey, PRBool isSender, SECItem *randomA, SECItem *randomB, diff --git a/security/nss/lib/pk11wrap/pk11skey.c b/security/nss/lib/pk11wrap/pk11skey.c index 03e314cd0..27c05067a 100644 --- a/security/nss/lib/pk11wrap/pk11skey.c +++ b/security/nss/lib/pk11wrap/pk11skey.c @@ -52,12 +52,6 @@ #include "secerr.h" #include "hasht.h" -/* forward static declarations. */ -static PK11SymKey *pk11_DeriveWithTemplate(PK11SymKey *baseKey, - CK_MECHANISM_TYPE derive, SECItem *param, CK_MECHANISM_TYPE target, - CK_ATTRIBUTE_TYPE operation, int keySize, CK_ATTRIBUTE *userAttr, - unsigned int numAttrs, PRBool isPerm); - static void pk11_EnterKeyMonitor(PK11SymKey *symKey) { if (!symKey->sessionOwner || !(symKey->slot->isThreadSafe)) @@ -1368,7 +1362,7 @@ PK11_Derive( PK11SymKey *baseKey, CK_MECHANISM_TYPE derive, SECItem *param, CK_MECHANISM_TYPE target, CK_ATTRIBUTE_TYPE operation, int keySize) { - return pk11_DeriveWithTemplate(baseKey, derive, param, target, operation, + return PK11_DeriveWithTemplate(baseKey, derive, param, target, operation, keySize, NULL, 0, PR_FALSE); } @@ -1383,7 +1377,7 @@ PK11_DeriveWithFlags( PK11SymKey *baseKey, CK_MECHANISM_TYPE derive, unsigned int templateCount; templateCount = pk11_OpFlagsToAttributes(flags, keyTemplate, &ckTrue); - return pk11_DeriveWithTemplate(baseKey, derive, param, target, operation, + return PK11_DeriveWithTemplate(baseKey, derive, param, target, operation, keySize, keyTemplate, templateCount, PR_FALSE); } @@ -1403,12 +1397,12 @@ PK11_DeriveWithFlagsPerm( PK11SymKey *baseKey, CK_MECHANISM_TYPE derive, } templateCount = attrs - keyTemplate; templateCount += pk11_OpFlagsToAttributes(flags, attrs, &cktrue); - return pk11_DeriveWithTemplate(baseKey, derive, param, target, operation, + return PK11_DeriveWithTemplate(baseKey, derive, param, target, operation, keySize, keyTemplate, templateCount, isPerm); } -static PK11SymKey * -pk11_DeriveWithTemplate( PK11SymKey *baseKey, CK_MECHANISM_TYPE derive, +PK11SymKey * +PK11_DeriveWithTemplate( PK11SymKey *baseKey, CK_MECHANISM_TYPE derive, SECItem *param, CK_MECHANISM_TYPE target, CK_ATTRIBUTE_TYPE operation, int keySize, CK_ATTRIBUTE *userAttr, unsigned int numAttrs, PRBool isPerm) |