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

Side by Side Diff: nss/lib/certdb/certxutl.c

Issue 16132005: Allow NSS to be built with NO_NSPR_10_SUPPORT. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/nss/
Patch Set: Created 7 years, 6 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/certdb/certv3.c ('k') | nss/lib/certdb/crl.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 /* 5 /*
6 * Certificate Extensions handling code 6 * Certificate Extensions handling code
7 * 7 *
8 */ 8 */
9 9
10 #include "cert.h" 10 #include "cert.h"
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 104
105 105
106 typedef struct _extNode { 106 typedef struct _extNode {
107 struct _extNode *next; 107 struct _extNode *next;
108 CERTCertExtension *ext; 108 CERTCertExtension *ext;
109 } extNode; 109 } extNode;
110 110
111 typedef struct { 111 typedef struct {
112 void (*setExts)(void *object, CERTCertExtension **exts); 112 void (*setExts)(void *object, CERTCertExtension **exts);
113 void *object; 113 void *object;
114 PRArenaPool *ownerArena; 114 PLArenaPool *ownerArena;
115 PRArenaPool *arena; 115 PLArenaPool *arena;
116 extNode *head; 116 extNode *head;
117 int count; 117 int count;
118 }extRec; 118 }extRec;
119 119
120 /* 120 /*
121 * cert_StartExtensions 121 * cert_StartExtensions
122 * 122 *
123 * NOTE: This interface changed significantly to remove knowledge 123 * NOTE: This interface changed significantly to remove knowledge
124 * about callers data structures (owner objects) 124 * about callers data structures (owner objects)
125 */ 125 */
126 void * 126 void *
127 cert_StartExtensions(void *owner, PRArenaPool *ownerArena, 127 cert_StartExtensions(void *owner, PLArenaPool *ownerArena,
128 void (*setExts)(void *object, CERTCertExtension **exts)) 128 void (*setExts)(void *object, CERTCertExtension **exts))
129 { 129 {
130 PRArenaPool *arena; 130 PLArenaPool *arena;
131 extRec *handle; 131 extRec *handle;
132 132
133 arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); 133 arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE);
134 if ( !arena ) { 134 if ( !arena ) {
135 return(0); 135 return(0);
136 } 136 }
137 137
138 handle = (extRec *)PORT_ArenaAlloc(arena, sizeof(extRec)); 138 handle = (extRec *)PORT_ArenaAlloc(arena, sizeof(extRec));
139 if ( !handle ) { 139 if ( !handle ) {
140 PORT_FreeArena(arena, PR_FALSE); 140 PORT_FreeArena(arena, PR_FALSE);
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 390
391 /* 391 /*
392 * get the value of the Netscape Certificate Type Extension 392 * get the value of the Netscape Certificate Type Extension
393 */ 393 */
394 SECStatus 394 SECStatus
395 CERT_FindBitStringExtension (CERTCertExtension **extensions, int tag, 395 CERT_FindBitStringExtension (CERTCertExtension **extensions, int tag,
396 SECItem *retItem) 396 SECItem *retItem)
397 { 397 {
398 SECItem wrapperItem, tmpItem = {siBuffer,0}; 398 SECItem wrapperItem, tmpItem = {siBuffer,0};
399 SECStatus rv; 399 SECStatus rv;
400 PRArenaPool *arena = NULL; 400 PLArenaPool *arena = NULL;
401 401
402 wrapperItem.data = NULL; 402 wrapperItem.data = NULL;
403 tmpItem.data = NULL; 403 tmpItem.data = NULL;
404 404
405 arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); 405 arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE);
406 406
407 if ( ! arena ) { 407 if ( ! arena ) {
408 return(SECFailure); 408 return(SECFailure);
409 } 409 }
410 410
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 if (SECOID_KnownCertExtenOID (&ext->id) == PR_FALSE) { 490 if (SECOID_KnownCertExtenOID (&ext->id) == PR_FALSE) {
491 hasUnknownCriticalExten = PR_TRUE; 491 hasUnknownCriticalExten = PR_TRUE;
492 break; 492 break;
493 } 493 }
494 } 494 }
495 exts++; 495 exts++;
496 } 496 }
497 } 497 }
498 return (hasUnknownCriticalExten); 498 return (hasUnknownCriticalExten);
499 } 499 }
OLDNEW
« no previous file with comments | « nss/lib/certdb/certv3.c ('k') | nss/lib/certdb/crl.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698