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

Unified Diff: crypto/ec_private_key_openssl.cc

Issue 1133303003: Add support for crypto::ECPrivateKey::Copy when built with BoringSSL (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: switch back to dup; remove unnecessary check Created 5 years, 7 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 | « crypto/ec_private_key.h ('k') | crypto/ec_private_key_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: crypto/ec_private_key_openssl.cc
diff --git a/crypto/ec_private_key_openssl.cc b/crypto/ec_private_key_openssl.cc
index b6b004cfb609b4204bed4eaab0d72b68389559e7..45657a73911cdd4ff37fe192fe8251a31bdd368e 100644
--- a/crypto/ec_private_key_openssl.cc
+++ b/crypto/ec_private_key_openssl.cc
@@ -85,6 +85,13 @@ ECPrivateKey::~ECPrivateKey() {
EVP_PKEY_free(key_);
}
+ECPrivateKey* ECPrivateKey::Copy() const {
+ scoped_ptr<ECPrivateKey> copy(new ECPrivateKey);
+ if (key_)
+ copy->key_ = EVP_PKEY_dup(key_);
+ return copy.release();
+}
+
// static
bool ECPrivateKey::IsSupported() { return true; }
« no previous file with comments | « crypto/ec_private_key.h ('k') | crypto/ec_private_key_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698