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

Side by Side Diff: net/base/ev_root_ca_metadata.cc

Issue 10983023: Port certificate verification to iOS. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Review comments Created 8 years, 2 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
« no previous file with comments | « net/base/cert_verify_proc_unittest.cc ('k') | net/base/multi_threaded_cert_verifier.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/base/ev_root_ca_metadata.h" 5 #include "net/base/ev_root_ca_metadata.h"
6 6
7 #if defined(USE_NSS) || defined(OS_IOS) 7 #if defined(USE_NSS) || defined(OS_IOS)
8 #include <cert.h> 8 #include <cert.h>
9 #include <pkcs11n.h> 9 #include <pkcs11n.h>
10 #include <secerr.h> 10 #include <secerr.h>
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 } 458 }
459 459
460 bool EVRootCAMetadata::RemoveEVCA(const SHA1HashValue& fingerprint) { 460 bool EVRootCAMetadata::RemoveEVCA(const SHA1HashValue& fingerprint) {
461 return true; 461 return true;
462 } 462 }
463 463
464 #endif 464 #endif
465 465
466 EVRootCAMetadata::EVRootCAMetadata() { 466 EVRootCAMetadata::EVRootCAMetadata() {
467 // Constructs the object from the raw metadata in ev_root_ca_metadata. 467 // Constructs the object from the raw metadata in ev_root_ca_metadata.
468 #if defined(USE_NSS) 468 #if defined(USE_NSS) || defined(OS_IOS)
469 crypto::EnsureNSSInit(); 469 crypto::EnsureNSSInit();
470 470
471 for (size_t i = 0; i < arraysize(ev_root_ca_metadata); i++) { 471 for (size_t i = 0; i < arraysize(ev_root_ca_metadata); i++) {
472 const EVMetadata& metadata = ev_root_ca_metadata[i]; 472 const EVMetadata& metadata = ev_root_ca_metadata[i];
473 for (size_t j = 0; j < arraysize(metadata.policy_oids); j++) { 473 for (size_t j = 0; j < arraysize(metadata.policy_oids); j++) {
474 if (metadata.policy_oids[j][0] == '\0') 474 if (metadata.policy_oids[j][0] == '\0')
475 break; 475 break;
476 const char* policy_oid = metadata.policy_oids[j]; 476 const char* policy_oid = metadata.policy_oids[j];
477 477
478 PolicyOID policy; 478 PolicyOID policy;
479 if (!RegisterOID(policy_oid, &policy)) { 479 if (!RegisterOID(policy_oid, &policy)) {
480 LOG(ERROR) << "Failed to register OID: " << policy_oid; 480 LOG(ERROR) << "Failed to register OID: " << policy_oid;
481 continue; 481 continue;
482 } 482 }
483 483
484 ev_policy_[metadata.fingerprint].push_back(policy); 484 ev_policy_[metadata.fingerprint].push_back(policy);
485 policy_oids_.insert(policy); 485 policy_oids_.insert(policy);
486 } 486 }
487 } 487 }
488 #endif 488 #endif
489 } 489 }
490 490
491 EVRootCAMetadata::~EVRootCAMetadata() { } 491 EVRootCAMetadata::~EVRootCAMetadata() { }
492 492
493 } // namespace net 493 } // namespace net
OLDNEW
« no previous file with comments | « net/base/cert_verify_proc_unittest.cc ('k') | net/base/multi_threaded_cert_verifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698