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

Side by Side Diff: nss/lib/freebl/aeskeywrap.c

Issue 195763027: Update NSS to NSS_3_16_RC0. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/nss/
Patch Set: Use the RTM tag Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « nss/lib/ckfw/builtins/nssckbi.h ('k') | nss/lib/freebl/arcfour.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * aeskeywrap.c - implement AES Key Wrap algorithm from RFC 3394 2 * aeskeywrap.c - implement AES Key Wrap algorithm from RFC 3394
3 * 3 *
4 * This Source Code Form is subject to the terms of the Mozilla Public 4 * This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this 5 * License, v. 2.0. If a copy of the MPL was not distributed with this
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 6 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 7
8 #ifdef FREEBL_NO_DEPEND 8 #ifdef FREEBL_NO_DEPEND
9 #include "stubs.h" 9 #include "stubs.h"
10 #endif 10 #endif
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 /* 362 /*
363 ** 3) Output the results. 363 ** 3) Output the results.
364 */ 364 */
365 if (s == SECSuccess) { 365 if (s == SECSuccess) {
366 int bad = memcmp(&A, cx->iv, AES_KEY_WRAP_IV_BYTES); 366 int bad = memcmp(&A, cx->iv, AES_KEY_WRAP_IV_BYTES);
367 if (!bad) { 367 if (!bad) {
368 memcpy(output, &R[1], outLen); 368 memcpy(output, &R[1], outLen);
369 if (pOutputLen) 369 if (pOutputLen)
370 *pOutputLen = outLen; 370 *pOutputLen = outLen;
371 } else { 371 } else {
372 s = SECFailure;
372 PORT_SetError(SEC_ERROR_BAD_DATA); 373 PORT_SetError(SEC_ERROR_BAD_DATA);
373 if (pOutputLen) 374 if (pOutputLen)
374 *pOutputLen = 0; 375 *pOutputLen = 0;
375 } 376 }
376 } else if (pOutputLen) { 377 } else if (pOutputLen) {
377 *pOutputLen = 0; 378 *pOutputLen = 0;
378 } 379 }
379 PORT_ZFree(R, inputLen); 380 PORT_ZFree(R, inputLen);
380 return s; 381 return s;
381 } 382 }
382 #undef A 383 #undef A
OLDNEW
« no previous file with comments | « nss/lib/ckfw/builtins/nssckbi.h ('k') | nss/lib/freebl/arcfour.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698