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/ssl/client_cert_store_impl.h" | 5 #include "net/ssl/client_cert_store_impl.h" |
6 | 6 |
7 #include <CommonCrypto/CommonDigest.h> | 7 #include <CommonCrypto/CommonDigest.h> |
8 #include <CoreFoundation/CFArray.h> | 8 #include <CoreFoundation/CFArray.h> |
9 #include <CoreServices/CoreServices.h> | 9 #include <CoreServices/CoreServices.h> |
10 #include <Security/SecBase.h> | 10 #include <Security/SecBase.h> |
11 #include <Security/Security.h> | 11 #include <Security/Security.h> |
12 | 12 |
13 #include <algorithm> | 13 #include <algorithm> |
14 #include <string> | 14 #include <string> |
15 | 15 |
16 #include "base/logging.h" | 16 #include "base/logging.h" |
17 #include "base/mac/mac_logging.h" | 17 #include "base/mac/mac_logging.h" |
18 #include "base/mac/scoped_cftyperef.h" | 18 #include "base/mac/scoped_cftyperef.h" |
19 #include "base/strings/sys_string_conversions.h" | 19 #include "base/strings/sys_string_conversions.h" |
20 #include "base/synchronization/lock.h" | 20 #include "base/synchronization/lock.h" |
21 #include "crypto/mac_security_services_lock.h" | 21 #include "crypto/mac_security_services_lock.h" |
22 #include "net/base/host_port_pair.h" | 22 #include "net/base/host_port_pair.h" |
23 #include "net/cert/x509_util.h" | 23 #include "net/cert/x509_util.h" |
24 #include "net/cert/x509_util_mac.h" | 24 #include "net/cert/x509_util_mac.h" |
25 | 25 |
26 using base::mac::ScopedCFTypeRef; | 26 using base::ScopedCFTypeRef; |
27 | 27 |
28 namespace net { | 28 namespace net { |
29 | 29 |
30 namespace { | 30 namespace { |
31 | 31 |
32 // Gets the issuer for a given cert, starting with the cert itself and | 32 // Gets the issuer for a given cert, starting with the cert itself and |
33 // including the intermediate and finally root certificates (if any). | 33 // including the intermediate and finally root certificates (if any). |
34 // This function calls SecTrust but doesn't actually pay attention to the trust | 34 // This function calls SecTrust but doesn't actually pay attention to the trust |
35 // result: it shouldn't be used to determine trust, just to traverse the chain. | 35 // result: it shouldn't be used to determine trust, just to traverse the chain. |
36 // Caller is responsible for releasing the value stored into *out_cert_chain. | 36 // Caller is responsible for releasing the value stored into *out_cert_chain. |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
259 const scoped_refptr<X509Certificate>& preferred_cert, | 259 const scoped_refptr<X509Certificate>& preferred_cert, |
260 const CertificateList& regular_certs, | 260 const CertificateList& regular_certs, |
261 const SSLCertRequestInfo& request, | 261 const SSLCertRequestInfo& request, |
262 CertificateList* selected_certs) { | 262 CertificateList* selected_certs) { |
263 return GetClientCertsImpl(preferred_cert, regular_certs, request, false, | 263 return GetClientCertsImpl(preferred_cert, regular_certs, request, false, |
264 selected_certs); | 264 selected_certs); |
265 } | 265 } |
266 #endif | 266 #endif |
267 | 267 |
268 } // namespace net | 268 } // namespace net |
OLD | NEW |