Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(36)

Unified Diff: net/ssl/test_ssl_private_key.cc

Issue 2898573002: Refactor client cert private key handling. (Closed)
Patch Set: removed no longer needed forward declaration Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/ssl/test_ssl_private_key.h ('k') | net/test/url_request/url_request_mock_data_job.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « net/ssl/test_ssl_private_key.h ('k') | net/test/url_request/url_request_mock_data_job.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698