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

Side by Side Diff: nss/mozilla/security/nss/lib/pk11wrap/pk11cxt.c

Issue 3135002: Update to NSS 3.12.7 and NSPR 4.8.6.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/
Patch Set: Created 10 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* ***** BEGIN LICENSE BLOCK ***** 1 /* ***** BEGIN LICENSE BLOCK *****
2 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 2 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
3 * 3 *
4 * The contents of this file are subject to the Mozilla Public License Version 4 * The contents of this file are subject to the Mozilla Public License Version
5 * 1.1 (the "License"); you may not use this file except in compliance with 5 * 1.1 (the "License"); you may not use this file except in compliance with
6 * the License. You may obtain a copy of the License at 6 * the License. You may obtain a copy of the License at
7 * http://www.mozilla.org/MPL/ 7 * http://www.mozilla.org/MPL/
8 * 8 *
9 * Software distributed under the License is distributed on an "AS IS" basis, 9 * Software distributed under the License is distributed on an "AS IS" basis,
10 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 10 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 */ 242 */
243 static PK11Context *pk11_CreateNewContextInSlot(CK_MECHANISM_TYPE type, 243 static PK11Context *pk11_CreateNewContextInSlot(CK_MECHANISM_TYPE type,
244 PK11SlotInfo *slot, CK_ATTRIBUTE_TYPE operation, PK11SymKey *symKey, 244 PK11SlotInfo *slot, CK_ATTRIBUTE_TYPE operation, PK11SymKey *symKey,
245 SECItem *param) 245 SECItem *param)
246 { 246 {
247 CK_MECHANISM mech_info; 247 CK_MECHANISM mech_info;
248 PK11Context *context; 248 PK11Context *context;
249 SECStatus rv; 249 SECStatus rv;
250 250
251 PORT_Assert(slot != NULL); 251 PORT_Assert(slot != NULL);
252 if (!slot || (!symKey && operation != CKA_DIGEST)) { 252 if (!slot || (!symKey && ((operation != CKA_DIGEST) ||
253 » (type == CKM_SKIPJACK_CBC64)))) {
253 PORT_SetError(SEC_ERROR_INVALID_ARGS); 254 PORT_SetError(SEC_ERROR_INVALID_ARGS);
254 return NULL; 255 return NULL;
255 } 256 }
256 context = (PK11Context *) PORT_Alloc(sizeof(PK11Context)); 257 context = (PK11Context *) PORT_Alloc(sizeof(PK11Context));
257 if (context == NULL) { 258 if (context == NULL) {
258 return NULL; 259 return NULL;
259 } 260 }
260 261
261 /* now deal with the fortezza hack... the fortezza hack is an attempt 262 /* now deal with the fortezza hack... the fortezza hack is an attempt
262 * to get around the issue of the card not allowing you to do a FORTEZZA 263 * to get around the issue of the card not allowing you to do a FORTEZZA
(...skipping 796 matching lines...) Expand 10 before | Expand all | Expand 10 after
1059 context->init = PR_FALSE; /* allow Begin to start up again */ 1060 context->init = PR_FALSE; /* allow Begin to start up again */
1060 1061
1061 1062
1062 if (crv != CKR_OK) { 1063 if (crv != CKR_OK) {
1063 PORT_SetError( PK11_MapError(crv) ); 1064 PORT_SetError( PK11_MapError(crv) );
1064 return SECFailure; 1065 return SECFailure;
1065 } 1066 }
1066 return SECSuccess; 1067 return SECSuccess;
1067 } 1068 }
1068 1069
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698