Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(568)

Unified Diff: nss/lib/pk11wrap/pk11mech.c

Issue 1017413002: Uprev NSS to 3.18 RTM (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/nss.git@nspr_uprev
Patch Set: Rebased Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « nss/lib/pk11wrap/pk11cert.c ('k') | nss/lib/pk11wrap/pk11pub.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: nss/lib/pk11wrap/pk11mech.c
diff --git a/nss/lib/pk11wrap/pk11mech.c b/nss/lib/pk11wrap/pk11mech.c
index 415a47b4121572c07823681d007314c447b76d69..edc7a9b6553bf64e00aa0e9323a0c8f1eaab0323 100644
--- a/nss/lib/pk11wrap/pk11mech.c
+++ b/nss/lib/pk11wrap/pk11mech.c
@@ -1384,12 +1384,13 @@ pk11_GenerateNewParamWithKeyLen(CK_MECHANISM_TYPE type, int keyLen)
SECItem iv;
SECStatus rv;
-
mech = (SECItem *) PORT_Alloc(sizeof(SECItem));
if (mech == NULL) return NULL;
rv = SECSuccess;
mech->type = siBuffer;
+ mech->data = NULL;
+ mech->len = 0;
switch (type) {
case CKM_RC4:
case CKM_SEED_ECB:
@@ -1402,8 +1403,6 @@ pk11_GenerateNewParamWithKeyLen(CK_MECHANISM_TYPE type, int keyLen)
case CKM_CAST_ECB:
case CKM_CAST3_ECB:
case CKM_CAST5_ECB:
- mech->data = NULL;
- mech->len = 0;
break;
case CKM_RC2_ECB:
rc2_ecb_params = (CK_RC2_PARAMS *)PORT_Alloc(sizeof(CK_RC2_PARAMS));
@@ -1451,8 +1450,6 @@ pk11_GenerateNewParamWithKeyLen(CK_MECHANISM_TYPE type, int keyLen)
return PK11_ParamFromIV(type,&iv);
default:
if (pk11_lookup(type)->iv == 0) {
- mech->data = NULL;
- mech->len = 0;
break;
}
case CKM_SEED_CBC:
« no previous file with comments | « nss/lib/pk11wrap/pk11cert.c ('k') | nss/lib/pk11wrap/pk11pub.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698