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

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

Issue 36593002: crypto/nss_util: Get TPM slot id, do lookup by id instead of by name. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sandbox debugging crap Created 7 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 | Annotate | Revision Log
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/cert/ev_root_ca_metadata.h" 5 #include "net/cert/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 547 matching lines...) Expand 10 before | Expand all | Expand 10 after
558 558
559 bool EVRootCAMetadata::RemoveEVCA(const SHA1HashValue& fingerprint) { 559 bool EVRootCAMetadata::RemoveEVCA(const SHA1HashValue& fingerprint) {
560 return true; 560 return true;
561 } 561 }
562 562
563 #endif 563 #endif
564 564
565 EVRootCAMetadata::EVRootCAMetadata() { 565 EVRootCAMetadata::EVRootCAMetadata() {
566 // Constructs the object from the raw metadata in ev_root_ca_metadata. 566 // Constructs the object from the raw metadata in ev_root_ca_metadata.
567 #if defined(USE_NSS) || defined(OS_IOS) 567 #if defined(USE_NSS) || defined(OS_IOS)
568 LOG(ERROR) << "HIIIIIIIIIIIIIIIIIIIIIIIIIII";
568 crypto::EnsureNSSInit(); 569 crypto::EnsureNSSInit();
569 570
570 for (size_t i = 0; i < arraysize(ev_root_ca_metadata); i++) { 571 for (size_t i = 0; i < arraysize(ev_root_ca_metadata); i++) {
571 const EVMetadata& metadata = ev_root_ca_metadata[i]; 572 const EVMetadata& metadata = ev_root_ca_metadata[i];
572 for (size_t j = 0; j < arraysize(metadata.policy_oids); j++) { 573 for (size_t j = 0; j < arraysize(metadata.policy_oids); j++) {
573 if (metadata.policy_oids[j][0] == '\0') 574 if (metadata.policy_oids[j][0] == '\0')
574 break; 575 break;
575 const char* policy_oid = metadata.policy_oids[j]; 576 const char* policy_oid = metadata.policy_oids[j];
576 577
577 PolicyOID policy; 578 PolicyOID policy;
578 if (!RegisterOID(policy_oid, &policy)) { 579 if (!RegisterOID(policy_oid, &policy)) {
579 LOG(ERROR) << "Failed to register OID: " << policy_oid; 580 LOG(ERROR) << "Failed to register OID: " << policy_oid;
580 continue; 581 continue;
581 } 582 }
582 583
583 ev_policy_[metadata.fingerprint].push_back(policy); 584 ev_policy_[metadata.fingerprint].push_back(policy);
584 policy_oids_.insert(policy); 585 policy_oids_.insert(policy);
585 } 586 }
586 } 587 }
587 #endif 588 #endif
588 } 589 }
589 590
590 EVRootCAMetadata::~EVRootCAMetadata() { } 591 EVRootCAMetadata::~EVRootCAMetadata() { }
591 592
592 } // namespace net 593 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698