summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornicolson%netscape.com <devnull@localhost>2001-07-10 20:44:14 +0000
committernicolson%netscape.com <devnull@localhost>2001-07-10 20:44:14 +0000
commit9e524266b04998aca5d3f720359d93cce00aac5e (patch)
tree644cb485eead6d6b1e8d4bdc47ccb772d24ce65c
parent32cecaddf5473a637618effb05938c8b7fca3121 (diff)
downloadnss-hg-9e524266b04998aca5d3f720359d93cce00aac5e.tar.gz
Fix 90188, variable going out of scope.
-rw-r--r--security/nss/lib/pk11wrap/pk11skey.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/security/nss/lib/pk11wrap/pk11skey.c b/security/nss/lib/pk11wrap/pk11skey.c
index 618dce8dd..16417a8d8 100644
--- a/security/nss/lib/pk11wrap/pk11skey.c
+++ b/security/nss/lib/pk11wrap/pk11skey.c
@@ -1216,6 +1216,7 @@ PK11_TokenKeyGen(PK11SlotInfo *slot, CK_MECHANISM_TYPE type, SECItem *param,
PRBool weird = PR_FALSE; /* hack for fortezza */
CK_BBOOL ckfalse = CK_FALSE;
CK_BBOOL cktrue = CK_TRUE;
+ CK_ULONG ck_key_size; /* only used for variable-length keys */
if ((keySize == -1) && (type == CKM_SKIPJACK_CBC64)) {
weird = PR_TRUE;
@@ -1227,9 +1228,9 @@ PK11_TokenKeyGen(PK11SlotInfo *slot, CK_MECHANISM_TYPE type, SECItem *param,
? CKA_ENCRYPT : CKA_DECRYPT, &cktrue, sizeof(CK_BBOOL)); attrs++;
if (keySize != 0) {
- CK_ULONG key_size = keySize; /* Convert to PK11 type */
+ ck_key_size = keySize; /* Convert to PK11 type */
- PK11_SETATTRS(attrs, CKA_VALUE_LEN, &key_size, sizeof(key_size));
+ PK11_SETATTRS(attrs, CKA_VALUE_LEN, &ck_key_size, sizeof(ck_key_size));
attrs++;
}