| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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) | 7 #if defined(USE_NSS) |
| 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 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 "2.16.840.1.114171.500.9", | 309 "2.16.840.1.114171.500.9", |
| 310 "2.16.840.1.114404.1.1.2.4.1", | 310 "2.16.840.1.114404.1.1.2.4.1", |
| 311 "2.16.840.1.114412.2.1", | 311 "2.16.840.1.114412.2.1", |
| 312 "2.16.840.1.114413.1.7.23.3", | 312 "2.16.840.1.114413.1.7.23.3", |
| 313 "2.16.840.1.114414.1.7.23.3", | 313 "2.16.840.1.114414.1.7.23.3", |
| 314 }; | 314 }; |
| 315 #endif | 315 #endif |
| 316 | 316 |
| 317 static base::LazyInstance<EVRootCAMetadata, | 317 static base::LazyInstance<EVRootCAMetadata, |
| 318 base::LeakyLazyInstanceTraits<EVRootCAMetadata> > | 318 base::LeakyLazyInstanceTraits<EVRootCAMetadata> > |
| 319 g_ev_root_ca_metadata(base::LINKER_INITIALIZED); | 319 g_ev_root_ca_metadata = LINKER_ZERO_INITIALIZED; |
| 320 | 320 |
| 321 // static | 321 // static |
| 322 EVRootCAMetadata* EVRootCAMetadata::GetInstance() { | 322 EVRootCAMetadata* EVRootCAMetadata::GetInstance() { |
| 323 return g_ev_root_ca_metadata.Pointer(); | 323 return g_ev_root_ca_metadata.Pointer(); |
| 324 } | 324 } |
| 325 | 325 |
| 326 bool EVRootCAMetadata::GetPolicyOIDsForCA( | 326 bool EVRootCAMetadata::GetPolicyOIDsForCA( |
| 327 const SHA1Fingerprint& fingerprint, | 327 const SHA1Fingerprint& fingerprint, |
| 328 std::vector<PolicyOID>* policy_oids) const { | 328 std::vector<PolicyOID>* policy_oids) const { |
| 329 PolicyOidMap::const_iterator iter = ev_policy_.find(fingerprint); | 329 PolicyOidMap::const_iterator iter = ev_policy_.find(fingerprint); |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 436 // static | 436 // static |
| 437 bool EVRootCAMetadata::PolicyOIDsAreEqual(PolicyOID a, PolicyOID b) { | 437 bool EVRootCAMetadata::PolicyOIDsAreEqual(PolicyOID a, PolicyOID b) { |
| 438 #if defined(USE_NSS) | 438 #if defined(USE_NSS) |
| 439 return a == b; | 439 return a == b; |
| 440 #else | 440 #else |
| 441 return !strcmp(a, b); | 441 return !strcmp(a, b); |
| 442 #endif | 442 #endif |
| 443 } | 443 } |
| 444 | 444 |
| 445 } // namespace net | 445 } // namespace net |
| OLD | NEW |