OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/cert_database.h" | 5 #include "net/base/cert_database.h" |
6 | 6 |
7 // Work around https://bugzilla.mozilla.org/show_bug.cgi?id=455424 | |
8 // until NSS 3.12.2 comes out and we update to it. | |
9 #define Lock FOO_NSS_Lock | |
10 #include <pk11pub.h> | 7 #include <pk11pub.h> |
11 #include <secmod.h> | 8 #include <secmod.h> |
12 #include <ssl.h> | 9 #include <ssl.h> |
13 #include <nssb64.h> // NSSBase64_EncodeItem() | 10 #include <nssb64.h> // NSSBase64_EncodeItem() |
14 #include <secder.h> // DER_Encode() | 11 #include <secder.h> // DER_Encode() |
15 #include <cryptohi.h> // SEC_DerSignData() | 12 #include <cryptohi.h> // SEC_DerSignData() |
16 #include <keyhi.h> // SECKEY_CreateSubjectPublicKeyInfo() | 13 #include <keyhi.h> // SECKEY_CreateSubjectPublicKeyInfo() |
17 #undef Lock | |
18 | 14 |
19 #include "base/logging.h" | 15 #include "base/logging.h" |
20 #include "base/scoped_ptr.h" | 16 #include "base/scoped_ptr.h" |
21 #include "base/nss_init.h" | 17 #include "base/nss_init.h" |
22 | 18 |
23 namespace net { | 19 namespace net { |
24 | 20 |
25 CertDatabase::CertDatabase() { | 21 CertDatabase::CertDatabase() { |
26 Init(); | 22 Init(); |
27 } | 23 } |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 } | 89 } |
94 CERT_DestroyCertificate(cert); | 90 CERT_DestroyCertificate(cert); |
95 return is_success; | 91 return is_success; |
96 } | 92 } |
97 | 93 |
98 void CertDatabase::Init() { | 94 void CertDatabase::Init() { |
99 base::EnsureNSSInit(); | 95 base::EnsureNSSInit(); |
100 } | 96 } |
101 | 97 |
102 } // namespace net | 98 } // namespace net |
OLD | NEW |