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

Side by Side Diff: mozilla/security/nss/lib/certhigh/certhigh.c

Issue 12197027: Merge NSS_3_14_2_RTM. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/nss/
Patch Set: Created 7 years, 10 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 /* 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 #include "nspr.h" 4 #include "nspr.h"
5 #include "secerr.h" 5 #include "secerr.h"
6 #include "secasn1.h" 6 #include "secasn1.h"
7 #include "seccomon.h" 7 #include "seccomon.h"
8 #include "pk11func.h" 8 #include "pk11func.h"
9 #include "certdb.h" 9 #include "certdb.h"
10 #include "certt.h" 10 #include "certt.h"
(...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after
535 PORT_FreeArena(names->arena, PR_FALSE); 535 PORT_FreeArena(names->arena, PR_FALSE);
536 536
537 return; 537 return;
538 } 538 }
539 539
540 static SECStatus 540 static SECStatus
541 CollectDistNames( CERTCertificate *cert, SECItem *k, void *data) 541 CollectDistNames( CERTCertificate *cert, SECItem *k, void *data)
542 { 542 {
543 CERTDistNames *names; 543 CERTDistNames *names;
544 PRBool saveit = PR_FALSE; 544 PRBool saveit = PR_FALSE;
545 CERTCertTrust *trust; 545 CERTCertTrust trust;
546 dnameNode *node; 546 dnameNode *node;
547 int len; 547 int len;
548 548
549 names = (CERTDistNames *)data; 549 names = (CERTDistNames *)data;
550 550
551 if ( cert->trust ) { 551 if ( CERT_GetCertTrust(cert, &trust) == SECSuccess ) {
552 » trust = cert->trust;
553 »
554 /* only collect names of CAs trusted for issuing SSL clients */ 552 /* only collect names of CAs trusted for issuing SSL clients */
555 » if ( trust->sslFlags & CERTDB_TRUSTED_CLIENT_CA ) { 553 » if ( trust.sslFlags & CERTDB_TRUSTED_CLIENT_CA ) {
556 saveit = PR_TRUE; 554 saveit = PR_TRUE;
557 } 555 }
558 } 556 }
559 557
560 if ( saveit ) { 558 if ( saveit ) {
561 /* allocate the node */ 559 /* allocate the node */
562 node = (dnameNode*)PORT_ArenaAlloc(names->arena, sizeof(dnameNode)); 560 node = (dnameNode*)PORT_ArenaAlloc(names->arena, sizeof(dnameNode));
563 if ( node == NULL ) { 561 if ( node == NULL ) {
564 return(SECFailure); 562 return(SECFailure);
565 } 563 }
(...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after
1186 } 1184 }
1187 return NULL; 1185 return NULL;
1188 } 1186 }
1189 1187
1190 void 1188 void
1191 CERT_DestroyCertificateList(CERTCertificateList *list) 1189 CERT_DestroyCertificateList(CERTCertificateList *list)
1192 { 1190 {
1193 PORT_FreeArena(list->arena, PR_FALSE); 1191 PORT_FreeArena(list->arena, PR_FALSE);
1194 } 1192 }
1195 1193
OLDNEW
« no previous file with comments | « mozilla/security/nss/lib/certdb/stanpcertdb.c ('k') | mozilla/security/nss/lib/certhigh/certvfy.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698