diff options
author | nharper <nharper@chromium.org> | 2015-05-12 16:08:58 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-05-12 23:09:13 +0000 |
commit | e6bf56c073dcb15017f4985d75991dc176b8dda1 (patch) | |
tree | 897d09fce30c9951d908d62cbc8f4ed9ca0029ff /crypto/ec_private_key_openssl.cc | |
parent | 0ebc69916d4d5c8f2f3a57097fef7b68bd469df7 (diff) | |
download | chromium_src-e6bf56c073dcb15017f4985d75991dc176b8dda1.zip chromium_src-e6bf56c073dcb15017f4985d75991dc176b8dda1.tar.gz chromium_src-e6bf56c073dcb15017f4985d75991dc176b8dda1.tar.bz2 |
Add support for crypto::ECPrivateKey::Copy when built with BoringSSL
BUG=457566
Review URL: https://codereview.chromium.org/1133303003
Cr-Commit-Position: refs/heads/master@{#329527}
Diffstat (limited to 'crypto/ec_private_key_openssl.cc')
-rw-r--r-- | crypto/ec_private_key_openssl.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/crypto/ec_private_key_openssl.cc b/crypto/ec_private_key_openssl.cc index b6b004c..45657a7 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; } |