| 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_android.h" | 5 #include "net/ssl/ssl_platform_key_android.h" |
| 6 | 6 |
| 7 #include <strings.h> | 7 #include <strings.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <utility> | 10 #include <utility> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "base/android/build_info.h" | 13 #include "base/android/build_info.h" |
| 14 #include "base/android/scoped_java_ref.h" | 14 #include "base/android/scoped_java_ref.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/macros.h" | 17 #include "base/macros.h" |
| 18 #include "base/memory/ptr_util.h" | 18 #include "base/memory/ptr_util.h" |
| 19 #include "net/android/keystore.h" | 19 #include "net/android/keystore.h" |
| 20 #include "net/android/legacy_openssl.h" | 20 #include "net/android/legacy_openssl.h" |
| 21 #include "net/base/net_errors.h" | 21 #include "net/base/net_errors.h" |
| 22 #include "net/ssl/openssl_client_key_store.h" | |
| 23 #include "net/ssl/ssl_platform_key.h" | |
| 24 #include "net/ssl/ssl_platform_key_util.h" | 22 #include "net/ssl/ssl_platform_key_util.h" |
| 25 #include "net/ssl/threaded_ssl_private_key.h" | 23 #include "net/ssl/threaded_ssl_private_key.h" |
| 26 #include "third_party/boringssl/src/include/openssl/ecdsa.h" | 24 #include "third_party/boringssl/src/include/openssl/ecdsa.h" |
| 27 #include "third_party/boringssl/src/include/openssl/evp.h" | 25 #include "third_party/boringssl/src/include/openssl/evp.h" |
| 28 #include "third_party/boringssl/src/include/openssl/mem.h" | 26 #include "third_party/boringssl/src/include/openssl/mem.h" |
| 29 #include "third_party/boringssl/src/include/openssl/nid.h" | 27 #include "third_party/boringssl/src/include/openssl/nid.h" |
| 30 #include "third_party/boringssl/src/include/openssl/rsa.h" | 28 #include "third_party/boringssl/src/include/openssl/rsa.h" |
| 31 | 29 |
| 32 using base::android::JavaRef; | 30 using base::android::JavaRef; |
| 33 using base::android::ScopedJavaGlobalRef; | 31 using base::android::ScopedJavaGlobalRef; |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 } | 210 } |
| 213 } | 211 } |
| 214 } | 212 } |
| 215 } | 213 } |
| 216 | 214 |
| 217 return make_scoped_refptr(new ThreadedSSLPrivateKey( | 215 return make_scoped_refptr(new ThreadedSSLPrivateKey( |
| 218 base::MakeUnique<SSLPlatformKeyAndroid>(type, key, max_length, sys_rsa), | 216 base::MakeUnique<SSLPlatformKeyAndroid>(type, key, max_length, sys_rsa), |
| 219 GetSSLPlatformKeyTaskRunner())); | 217 GetSSLPlatformKeyTaskRunner())); |
| 220 } | 218 } |
| 221 | 219 |
| 222 scoped_refptr<SSLPrivateKey> FetchClientCertPrivateKey( | |
| 223 const X509Certificate* certificate) { | |
| 224 return OpenSSLClientKeyStore::GetInstance()->FetchClientCertPrivateKey( | |
| 225 certificate); | |
| 226 } | |
| 227 | |
| 228 } // namespace net | 220 } // namespace net |
| OLD | NEW |