Index: net/ssl/test_ssl_private_key.cc |
diff --git a/net/ssl/test_ssl_private_key.cc b/net/ssl/test_ssl_private_key.cc |
index 687617885e947ba5b0b5a86fca2f0542d2385d53..732e2ea0fb2bd508272e563ae1cd113007a98ea9 100644 |
--- a/net/ssl/test_ssl_private_key.cc |
+++ b/net/ssl/test_ssl_private_key.cc |
@@ -9,6 +9,7 @@ |
#include "base/logging.h" |
#include "base/macros.h" |
#include "base/memory/ptr_util.h" |
+#include "crypto/rsa_private_key.h" |
#include "net/base/net_errors.h" |
#include "net/ssl/ssl_platform_key_util.h" |
#include "net/ssl/ssl_private_key.h" |
@@ -108,4 +109,11 @@ scoped_refptr<SSLPrivateKey> WrapOpenSSLPrivateKey( |
GetSSLPlatformKeyTaskRunner())); |
} |
+scoped_refptr<SSLPrivateKey> WrapRSAPrivateKey( |
+ crypto::RSAPrivateKey* rsa_private_key) { |
+ EVP_PKEY_up_ref(rsa_private_key->key()); |
+ return net::WrapOpenSSLPrivateKey( |
+ bssl::UniquePtr<EVP_PKEY>(rsa_private_key->key())); |
+} |
+ |
} // namespace net |