OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/android/keystore_openssl.h" | 5 #include "net/android/keystore_openssl.h" |
6 | 6 |
7 #include <jni.h> | 7 #include <jni.h> |
8 #include <openssl/bn.h> | 8 #include <openssl/bn.h> |
9 #include <openssl/ec.h> | 9 #include <openssl/ec.h> |
10 #include <openssl/engine.h> | 10 #include <openssl/engine.h> |
11 #include <openssl/err.h> | 11 #include <openssl/err.h> |
12 #include <openssl/evp.h> | 12 #include <openssl/evp.h> |
13 #include <openssl/rsa.h> | 13 #include <openssl/rsa.h> |
14 #include <stdint.h> | 14 #include <stdint.h> |
15 | 15 |
16 #include "base/android/build_info.h" | 16 #include "base/android/build_info.h" |
17 #include "base/android/scoped_java_ref.h" | 17 #include "base/android/scoped_java_ref.h" |
18 #include "base/lazy_instance.h" | 18 #include "base/lazy_instance.h" |
19 #include "base/logging.h" | 19 #include "base/logging.h" |
| 20 #include "base/memory/scoped_ptr.h" |
20 #include "crypto/openssl_util.h" | 21 #include "crypto/openssl_util.h" |
21 #include "net/android/keystore.h" | 22 #include "net/android/keystore.h" |
22 #include "net/android/legacy_openssl.h" | 23 #include "net/android/legacy_openssl.h" |
23 #include "net/ssl/scoped_openssl_types.h" | 24 #include "net/ssl/scoped_openssl_types.h" |
24 #include "net/ssl/ssl_client_cert_type.h" | 25 #include "net/ssl/ssl_client_cert_type.h" |
25 | 26 |
26 // IMPORTANT NOTE: The following code will currently only work when used | 27 // IMPORTANT NOTE: The following code will currently only work when used |
27 // to implement client certificate support with OpenSSL. That's because | 28 // to implement client certificate support with OpenSSL. That's because |
28 // only the signing operations used in this use case are implemented here. | 29 // only the signing operations used in this use case are implemented here. |
29 // | 30 // |
(...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
545 return GetEcdsaPkeyWrapper(private_key); | 546 return GetEcdsaPkeyWrapper(private_key); |
546 default: | 547 default: |
547 LOG(WARNING) | 548 LOG(WARNING) |
548 << "GetOpenSSLPrivateKeyWrapper() called with invalid key type"; | 549 << "GetOpenSSLPrivateKeyWrapper() called with invalid key type"; |
549 return nullptr; | 550 return nullptr; |
550 } | 551 } |
551 } | 552 } |
552 | 553 |
553 } // namespace android | 554 } // namespace android |
554 } // namespace net | 555 } // namespace net |
OLD | NEW |