| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/ssl_platform_key_mac.h" | 5 #include "net/ssl/ssl_platform_key_mac.h" |
| 6 | 6 |
| 7 #include <dlfcn.h> | 7 #include <dlfcn.h> |
| 8 #include <CoreFoundation/CoreFoundation.h> | 8 #include <CoreFoundation/CoreFoundation.h> |
| 9 #include <Security/cssm.h> | 9 #include <Security/cssm.h> |
| 10 #include <Security/SecBase.h> | 10 #include <Security/SecBase.h> |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 #include "net/cert/x509_certificate.h" | 32 #include "net/cert/x509_certificate.h" |
| 33 #include "net/ssl/ssl_platform_key.h" | 33 #include "net/ssl/ssl_platform_key.h" |
| 34 #include "net/ssl/ssl_platform_key_util.h" | 34 #include "net/ssl/ssl_platform_key_util.h" |
| 35 #include "net/ssl/ssl_private_key.h" | 35 #include "net/ssl/ssl_private_key.h" |
| 36 #include "net/ssl/threaded_ssl_private_key.h" | 36 #include "net/ssl/threaded_ssl_private_key.h" |
| 37 #include "third_party/boringssl/src/include/openssl/ecdsa.h" | 37 #include "third_party/boringssl/src/include/openssl/ecdsa.h" |
| 38 #include "third_party/boringssl/src/include/openssl/mem.h" | 38 #include "third_party/boringssl/src/include/openssl/mem.h" |
| 39 #include "third_party/boringssl/src/include/openssl/nid.h" | 39 #include "third_party/boringssl/src/include/openssl/nid.h" |
| 40 #include "third_party/boringssl/src/include/openssl/rsa.h" | 40 #include "third_party/boringssl/src/include/openssl/rsa.h" |
| 41 | 41 |
| 42 // TODO(davidben): Remove this after https://crbug.com/669240 is fixed. | |
| 43 #if !defined(MAC_OS_X_VERSION_10_12) || \ | 42 #if !defined(MAC_OS_X_VERSION_10_12) || \ |
| 44 MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_12 | 43 MAC_OS_X_VERSION_MIN_ALLOWED < MAC_OS_X_VERSION_10_12 |
| 44 // Redeclare typedefs that only exist in 10.12+ to suppress |
| 45 // -Wpartial-availability warnings. |
| 45 typedef CFStringRef SecKeyAlgorithm; | 46 typedef CFStringRef SecKeyAlgorithm; |
| 46 #endif | 47 #endif |
| 47 | 48 |
| 48 namespace net { | 49 namespace net { |
| 49 | 50 |
| 50 // CSSM functions are deprecated as of OSX 10.7, but have no replacement. | 51 // CSSM functions are deprecated as of OSX 10.7, but have no replacement. |
| 51 // https://bugs.chromium.org/p/chromium/issues/detail?id=590914#c1 | 52 // https://bugs.chromium.org/p/chromium/issues/detail?id=590914#c1 |
| 52 #pragma clang diagnostic push | 53 #pragma clang diagnostic push |
| 53 #pragma clang diagnostic ignored "-Wdeprecated-declarations" | 54 #pragma clang diagnostic ignored "-Wdeprecated-declarations" |
| 54 | 55 |
| (...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 421 } | 422 } |
| 422 | 423 |
| 423 scoped_refptr<SSLPrivateKey> FetchClientCertPrivateKey( | 424 scoped_refptr<SSLPrivateKey> FetchClientCertPrivateKey( |
| 424 const X509Certificate* certificate) { | 425 const X509Certificate* certificate) { |
| 425 return FetchClientCertPrivateKeyFromKeychain(certificate, nullptr); | 426 return FetchClientCertPrivateKeyFromKeychain(certificate, nullptr); |
| 426 } | 427 } |
| 427 | 428 |
| 428 #pragma clang diagnostic pop // "-Wdeprecated-declarations" | 429 #pragma clang diagnostic pop // "-Wdeprecated-declarations" |
| 429 | 430 |
| 430 } // namespace net | 431 } // namespace net |
| OLD | NEW |