OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_mac.h" | 5 #include "net/ssl/client_cert_store_mac.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> |
(...skipping 10 matching lines...) Expand all Loading... |
21 #include "base/synchronization/lock.h" | 21 #include "base/synchronization/lock.h" |
22 #include "crypto/mac_security_services_lock.h" | 22 #include "crypto/mac_security_services_lock.h" |
23 #include "net/base/host_port_pair.h" | 23 #include "net/base/host_port_pair.h" |
24 #include "net/cert/x509_util.h" | 24 #include "net/cert/x509_util.h" |
25 #include "net/cert/x509_util_mac.h" | 25 #include "net/cert/x509_util_mac.h" |
26 | 26 |
27 using base::ScopedCFTypeRef; | 27 using base::ScopedCFTypeRef; |
28 | 28 |
29 namespace net { | 29 namespace net { |
30 | 30 |
| 31 // CSSM functions are deprecated as of OSX 10.7, but have no replacement. |
| 32 // https://bugs.chromium.org/p/chromium/issues/detail?id=590914#c1 |
| 33 #pragma clang diagnostic push |
| 34 #pragma clang diagnostic ignored "-Wdeprecated-declarations" |
| 35 |
31 namespace { | 36 namespace { |
32 | 37 |
33 // Gets the issuer for a given cert, starting with the cert itself and | 38 // Gets the issuer for a given cert, starting with the cert itself and |
34 // including the intermediate and finally root certificates (if any). | 39 // including the intermediate and finally root certificates (if any). |
35 // This function calls SecTrust but doesn't actually pay attention to the trust | 40 // This function calls SecTrust but doesn't actually pay attention to the trust |
36 // result: it shouldn't be used to determine trust, just to traverse the chain. | 41 // result: it shouldn't be used to determine trust, just to traverse the chain. |
37 // Caller is responsible for releasing the value stored into *out_cert_chain. | 42 // Caller is responsible for releasing the value stored into *out_cert_chain. |
38 OSStatus CopyCertChain(SecCertificateRef cert_handle, | 43 OSStatus CopyCertChain(SecCertificateRef cert_handle, |
39 CFArrayRef* out_cert_chain) { | 44 CFArrayRef* out_cert_chain) { |
40 DCHECK(cert_handle); | 45 DCHECK(cert_handle); |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 bool ClientCertStoreMac::SelectClientCertsGivenPreferredForTesting( | 272 bool ClientCertStoreMac::SelectClientCertsGivenPreferredForTesting( |
268 const scoped_refptr<X509Certificate>& preferred_cert, | 273 const scoped_refptr<X509Certificate>& preferred_cert, |
269 const CertificateList& regular_certs, | 274 const CertificateList& regular_certs, |
270 const SSLCertRequestInfo& request, | 275 const SSLCertRequestInfo& request, |
271 CertificateList* selected_certs) { | 276 CertificateList* selected_certs) { |
272 GetClientCertsImpl( | 277 GetClientCertsImpl( |
273 preferred_cert, regular_certs, request, false, selected_certs); | 278 preferred_cert, regular_certs, request, false, selected_certs); |
274 return true; | 279 return true; |
275 } | 280 } |
276 | 281 |
| 282 #pragma clang diagnostic pop // "-Wdeprecated-declarations" |
| 283 |
277 } // namespace net | 284 } // namespace net |
OLD | NEW |