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/cert/x509_certificate.h" | 5 #include "net/cert/x509_certificate.h" |
6 | 6 |
7 #include <stdlib.h> | 7 #include <stdlib.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <map> | 10 #include <map> |
11 #include <string> | 11 #include <string> |
12 #include <vector> | 12 #include <vector> |
13 | 13 |
14 #include "base/base64.h" | 14 #include "base/base64.h" |
15 #include "base/lazy_instance.h" | 15 #include "base/lazy_instance.h" |
16 #include "base/logging.h" | 16 #include "base/logging.h" |
17 #include "base/memory/singleton.h" | 17 #include "base/memory/singleton.h" |
18 #include "base/metrics/histogram.h" | 18 #include "base/metrics/histogram.h" |
19 #include "base/pickle.h" | 19 #include "base/pickle.h" |
20 #include "base/sha1.h" | 20 #include "base/sha1.h" |
21 #include "base/string_util.h" | 21 #include "base/string_util.h" |
22 #include "base/strings/string_piece.h" | 22 #include "base/strings/string_piece.h" |
23 #include "base/synchronization/lock.h" | 23 #include "base/synchronization/lock.h" |
24 #include "base/time.h" | 24 #include "base/time.h" |
25 #include "googleurl/src/url_canon_ip.h" | 25 #include "googleurl/src/url_canon.h" |
26 #include "net/base/net_util.h" | 26 #include "net/base/net_util.h" |
27 #include "net/cert/pem_tokenizer.h" | 27 #include "net/cert/pem_tokenizer.h" |
28 | 28 |
29 namespace net { | 29 namespace net { |
30 | 30 |
31 namespace { | 31 namespace { |
32 | 32 |
33 // Indicates the order to use when trying to decode binary data, which is | 33 // Indicates the order to use when trying to decode binary data, which is |
34 // based on (speculation) as to what will be most common -> least common | 34 // based on (speculation) as to what will be most common -> least common |
35 const X509Certificate::Format kFormatDecodePriority[] = { | 35 const X509Certificate::Format kFormatDecodePriority[] = { |
(...skipping 656 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
692 RemoveFromCache(cert_handle_); | 692 RemoveFromCache(cert_handle_); |
693 FreeOSCertHandle(cert_handle_); | 693 FreeOSCertHandle(cert_handle_); |
694 } | 694 } |
695 for (size_t i = 0; i < intermediate_ca_certs_.size(); ++i) { | 695 for (size_t i = 0; i < intermediate_ca_certs_.size(); ++i) { |
696 RemoveFromCache(intermediate_ca_certs_[i]); | 696 RemoveFromCache(intermediate_ca_certs_[i]); |
697 FreeOSCertHandle(intermediate_ca_certs_[i]); | 697 FreeOSCertHandle(intermediate_ca_certs_[i]); |
698 } | 698 } |
699 } | 699 } |
700 | 700 |
701 } // namespace net | 701 } // namespace net |
OLD | NEW |