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

Side by Side Diff: nss/lib/ckfw/builtins/bfind.c

Issue 105893015: Update third_party/nss to NSS 3.15.4. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/nss/
Patch Set: Remove SVN property on new file nss/lib/freebl/rsapkcs.c Created 6 years, 11 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/certhigh/ocspsig.c ('k') | nss/lib/ckfw/builtins/certdata.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 /* This Source Code Form is subject to the terms of the Mozilla Public 1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this 2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4 4
5 #ifndef BUILTINS_H 5 #ifndef BUILTINS_H
6 #include "builtins.h" 6 #include "builtins.h"
7 #endif /* BUILTINS_H */ 7 #endif /* BUILTINS_H */
8 8
9 /* 9 /*
10 * builtins/find.c 10 * builtins/find.c
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 CK_ATTRIBUTE_PTR a, 108 CK_ATTRIBUTE_PTR a,
109 const NSSItem *b 109 const NSSItem *b
110 ) 110 )
111 { 111 {
112 PRBool prb; 112 PRBool prb;
113 113
114 if( a->ulValueLen != b->size ) { 114 if( a->ulValueLen != b->size ) {
115 /* match a decoded serial number */ 115 /* match a decoded serial number */
116 if ((a->type == CKA_SERIAL_NUMBER) && (a->ulValueLen < b->size)) { 116 if ((a->type == CKA_SERIAL_NUMBER) && (a->ulValueLen < b->size)) {
117 int len; 117 int len;
118 » unsigned char *data; 118 » unsigned char *data = NULL;
119 119
120 len = builtins_derUnwrapInt(b->data,b->size,&data); 120 len = builtins_derUnwrapInt(b->data,b->size,&data);
121 » if ((len == a->ulValueLen) && 121 » if (data &&
122 » » nsslibc_memequal(a->pValue, data, len, (PRStatus *)NULL)) { 122 » (len == a->ulValueLen) &&
123 » nsslibc_memequal(a->pValue, data, len, (PRStatus *)NULL)) {
123 return CK_TRUE; 124 return CK_TRUE;
124 } 125 }
125 } 126 }
126 return CK_FALSE; 127 return CK_FALSE;
127 } 128 }
128 129
129 prb = nsslibc_memequal(a->pValue, b->data, b->size, (PRStatus *)NULL); 130 prb = nsslibc_memequal(a->pValue, b->data, b->size, (PRStatus *)NULL);
130 131
131 if( PR_TRUE == prb ) { 132 if( PR_TRUE == prb ) {
132 return CK_TRUE; 133 return CK_TRUE;
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 loser: 242 loser:
242 nss_ZFreeIf(temp); 243 nss_ZFreeIf(temp);
243 nss_ZFreeIf(fo); 244 nss_ZFreeIf(fo);
244 nss_ZFreeIf(rv); 245 nss_ZFreeIf(rv);
245 if ((NSSArena *)NULL != arena) { 246 if ((NSSArena *)NULL != arena) {
246 NSSArena_Destroy(arena); 247 NSSArena_Destroy(arena);
247 } 248 }
248 return (NSSCKMDFindObjects *)NULL; 249 return (NSSCKMDFindObjects *)NULL;
249 } 250 }
250 251
OLDNEW
« no previous file with comments | « nss/lib/certhigh/ocspsig.c ('k') | nss/lib/ckfw/builtins/certdata.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698