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

Side by Side Diff: nss/mozilla/security/nss/lib/cryptohi/sechash.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 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 break; 228 break;
229 } 229 }
230 return hashOid; 230 return hashOid;
231 } 231 }
232 232
233 SECOidTag 233 SECOidTag
234 HASH_GetHMACOidTagByHashOidTag(SECOidTag hashOid) 234 HASH_GetHMACOidTagByHashOidTag(SECOidTag hashOid)
235 { 235 {
236 SECOidTag hmacOid = SEC_OID_UNKNOWN; 236 SECOidTag hmacOid = SEC_OID_UNKNOWN;
237 237
238 switch(hmacOid) { 238 switch(hashOid) {
239 /* no oid exists for HMAC_MD2 */ 239 /* no oid exists for HMAC_MD2 */
240 /* NSS does not define a oid for HMAC_MD4 */ 240 /* NSS does not define a oid for HMAC_MD4 */
241 case SEC_OID_SHA1: hmacOid = SEC_OID_HMAC_SHA1; break; 241 case SEC_OID_SHA1: hmacOid = SEC_OID_HMAC_SHA1; break;
242 case SEC_OID_SHA256: hmacOid = SEC_OID_HMAC_SHA256; break; 242 case SEC_OID_SHA256: hmacOid = SEC_OID_HMAC_SHA256; break;
243 case SEC_OID_SHA384: hmacOid = SEC_OID_HMAC_SHA384; break; 243 case SEC_OID_SHA384: hmacOid = SEC_OID_HMAC_SHA384; break;
244 case SEC_OID_SHA512: hmacOid = SEC_OID_HMAC_SHA512; break; 244 case SEC_OID_SHA512: hmacOid = SEC_OID_HMAC_SHA512; break;
245 default: hmacOid = SEC_OID_UNKNOWN; 245 default: hmacOid = SEC_OID_UNKNOWN;
246 PORT_SetError(SEC_ERROR_INVALID_ALGORITHM); 246 PORT_SetError(SEC_ERROR_INVALID_ALGORITHM);
247 break; 247 break;
248 } 248 }
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 (* context->hashobj->end)(context->hash_context, result, result_len, 413 (* context->hashobj->end)(context->hash_context, result, result_len,
414 max_result_len); 414 max_result_len);
415 return; 415 return;
416 } 416 }
417 417
418 HASH_HashType 418 HASH_HashType
419 HASH_GetType(HASHContext *context) 419 HASH_GetType(HASHContext *context)
420 { 420 {
421 return(context->hashobj->type); 421 return(context->hashobj->type);
422 } 422 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698