OLD | NEW |
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/http/transport_security_state.h" | 5 #include "net/http/transport_security_state.h" |
6 | 6 |
7 #if defined(USE_OPENSSL) | |
8 #include <openssl/ecdsa.h> | |
9 #include <openssl/ssl.h> | |
10 #else // !defined(USE_OPENSSL) | |
11 #include <cryptohi.h> | |
12 #include <hasht.h> | |
13 #include <keyhi.h> | |
14 #include <nspr.h> | |
15 #include <pk11pub.h> | |
16 #endif | |
17 | |
18 #include <algorithm> | 7 #include <algorithm> |
19 | 8 |
20 #include "base/base64.h" | 9 #include "base/base64.h" |
21 #include "base/build_time.h" | 10 #include "base/build_time.h" |
22 #include "base/json/json_writer.h" | 11 #include "base/json/json_writer.h" |
23 #include "base/logging.h" | 12 #include "base/logging.h" |
24 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
25 #include "base/metrics/histogram_macros.h" | 14 #include "base/metrics/histogram_macros.h" |
26 #include "base/metrics/sparse_histogram.h" | 15 #include "base/metrics/sparse_histogram.h" |
27 #include "base/sha1.h" | 16 #include "base/sha1.h" |
28 #include "base/strings/string_number_conversions.h" | 17 #include "base/strings/string_number_conversions.h" |
29 #include "base/strings/string_util.h" | 18 #include "base/strings/string_util.h" |
30 #include "base/strings/stringprintf.h" | 19 #include "base/strings/stringprintf.h" |
31 #include "base/strings/utf_string_conversions.h" | 20 #include "base/strings/utf_string_conversions.h" |
32 #include "base/values.h" | 21 #include "base/values.h" |
33 #include "crypto/sha2.h" | 22 #include "crypto/sha2.h" |
34 #include "net/base/host_port_pair.h" | 23 #include "net/base/host_port_pair.h" |
35 #include "net/cert/x509_cert_types.h" | 24 #include "net/cert/x509_cert_types.h" |
36 #include "net/cert/x509_certificate.h" | 25 #include "net/cert/x509_certificate.h" |
37 #include "net/dns/dns_util.h" | 26 #include "net/dns/dns_util.h" |
38 #include "net/http/http_security_headers.h" | 27 #include "net/http/http_security_headers.h" |
39 #include "net/ssl/ssl_info.h" | 28 #include "net/ssl/ssl_info.h" |
40 #include "url/gurl.h" | 29 #include "url/gurl.h" |
41 | 30 |
42 #if defined(USE_OPENSSL) | |
43 #include "crypto/openssl_util.h" | |
44 #endif | |
45 | |
46 namespace net { | 31 namespace net { |
47 | 32 |
48 namespace { | 33 namespace { |
49 | 34 |
50 #include "net/http/transport_security_state_static.h" | 35 #include "net/http/transport_security_state_static.h" |
51 | 36 |
52 const size_t kMaxHPKPReportCacheEntries = 50; | 37 const size_t kMaxHPKPReportCacheEntries = 50; |
53 const int kTimeToRememberHPKPReportsMins = 60; | 38 const int kTimeToRememberHPKPReportsMins = 60; |
54 const size_t kReportCacheKeyLength = 16; | 39 const size_t kReportCacheKeyLength = 16; |
55 | 40 |
(...skipping 1220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1276 TransportSecurityState::PKPStateIterator::PKPStateIterator( | 1261 TransportSecurityState::PKPStateIterator::PKPStateIterator( |
1277 const TransportSecurityState& state) | 1262 const TransportSecurityState& state) |
1278 : iterator_(state.enabled_pkp_hosts_.begin()), | 1263 : iterator_(state.enabled_pkp_hosts_.begin()), |
1279 end_(state.enabled_pkp_hosts_.end()) { | 1264 end_(state.enabled_pkp_hosts_.end()) { |
1280 } | 1265 } |
1281 | 1266 |
1282 TransportSecurityState::PKPStateIterator::~PKPStateIterator() { | 1267 TransportSecurityState::PKPStateIterator::~PKPStateIterator() { |
1283 } | 1268 } |
1284 | 1269 |
1285 } // namespace | 1270 } // namespace |
OLD | NEW |