OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #ifndef NET_SSL_TEST_SSL_PRIVATE_KEY_H_ | 5 #ifndef NET_SSL_TEST_SSL_PRIVATE_KEY_H_ |
6 #define NET_SSL_TEST_SSL_PRIVATE_KEY_H_ | 6 #define NET_SSL_TEST_SSL_PRIVATE_KEY_H_ |
7 | 7 |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "net/base/net_export.h" | 9 #include "net/base/net_export.h" |
10 #include "third_party/boringssl/src/include/openssl/base.h" | 10 #include "third_party/boringssl/src/include/openssl/base.h" |
11 | 11 |
| 12 namespace crypto { |
| 13 class RSAPrivateKey; |
| 14 } |
| 15 |
12 namespace net { | 16 namespace net { |
13 | 17 |
14 class SSLPrivateKey; | 18 class SSLPrivateKey; |
15 | 19 |
16 // Returns a new SSLPrivateKey which uses |key| for signing operations or | 20 // Returns a new SSLPrivateKey which uses |key| for signing operations or |
17 // nullptr on error. | 21 // nullptr on error. |
18 NET_EXPORT scoped_refptr<SSLPrivateKey> WrapOpenSSLPrivateKey( | 22 NET_EXPORT scoped_refptr<SSLPrivateKey> WrapOpenSSLPrivateKey( |
19 bssl::UniquePtr<EVP_PKEY> key); | 23 bssl::UniquePtr<EVP_PKEY> key); |
| 24 NET_EXPORT scoped_refptr<SSLPrivateKey> WrapRSAPrivateKey( |
| 25 crypto::RSAPrivateKey* rsa_private_key); |
20 | 26 |
21 } // namespace net | 27 } // namespace net |
22 | 28 |
23 #endif // NET_SSL_TEST_SSL_PRIVATE_KEY_H_ | 29 #endif // NET_SSL_TEST_SSL_PRIVATE_KEY_H_ |
OLD | NEW |