OLD | NEW |
1 // Copyright (c) 2010 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/test_root_certs.h" | 5 #include "net/base/test_root_certs.h" |
6 | 6 |
7 #include <cert.h> | 7 #include <cert.h> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/nss_util.h" | |
11 #include "base/stl_util-inl.h" | 10 #include "base/stl_util-inl.h" |
| 11 #include "crypto/nss_util.h" |
12 #include "net/base/x509_certificate.h" | 12 #include "net/base/x509_certificate.h" |
13 | 13 |
14 namespace net { | 14 namespace net { |
15 | 15 |
16 // TrustEntry is used to store the original CERTCertificate and CERTCertTrust | 16 // TrustEntry is used to store the original CERTCertificate and CERTCertTrust |
17 // for a certificate whose trust status has been changed by the | 17 // for a certificate whose trust status has been changed by the |
18 // TestRootCerts. | 18 // TestRootCerts. |
19 class TestRootCerts::TrustEntry { | 19 class TestRootCerts::TrustEntry { |
20 public: | 20 public: |
21 // Creates a new TrustEntry by incrementing the reference to |certificate| | 21 // Creates a new TrustEntry by incrementing the reference to |certificate| |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 | 106 |
107 bool TestRootCerts::IsEmpty() const { | 107 bool TestRootCerts::IsEmpty() const { |
108 return trust_cache_.empty(); | 108 return trust_cache_.empty(); |
109 } | 109 } |
110 | 110 |
111 TestRootCerts::~TestRootCerts() { | 111 TestRootCerts::~TestRootCerts() { |
112 Clear(); | 112 Clear(); |
113 } | 113 } |
114 | 114 |
115 void TestRootCerts::Init() { | 115 void TestRootCerts::Init() { |
116 base::EnsureNSSInit(); | 116 crypto::EnsureNSSInit(); |
117 } | 117 } |
118 | 118 |
119 } // namespace net | 119 } // namespace net |
OLD | NEW |