summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authordavidben <davidben@chromium.org>2015-05-13 15:14:57 -0700
committerCommit bot <commit-bot@chromium.org>2015-05-13 22:15:04 +0000
commitc681bac0d7e8c3777c8cc80d149932c8a438579b (patch)
treed64a7b318f6d48f36123a07dc73894f4316de002 /crypto
parenta311635161697b6fa55af300614beda7339f6bbd (diff)
downloadchromium_src-c681bac0d7e8c3777c8cc80d149932c8a438579b.zip
chromium_src-c681bac0d7e8c3777c8cc80d149932c8a438579b.tar.gz
chromium_src-c681bac0d7e8c3777c8cc80d149932c8a438579b.tar.bz2
Replace EVP_PKEY_dup calls with EVP_PKEY_up_ref.
This is a no-op change. BoringSSL deprecated EVP_PKEY_dup in favor of a new EVP_PKEY_up_ref. This makes it more obvious there isn't actually a copy and is more consistent with other ref-counted types. See https://boringssl.googlesource.com/boringssl/+/517da2f1efc91b179dfb1898f826b18a6a38f547%5E%21/#F3 BUG=none Review URL: https://codereview.chromium.org/1129083007 Cr-Commit-Position: refs/heads/master@{#329732}
Diffstat (limited to 'crypto')
-rw-r--r--crypto/ec_private_key_openssl.cc2
-rw-r--r--crypto/rsa_private_key_openssl.cc2
2 files changed, 2 insertions, 2 deletions
diff --git a/crypto/ec_private_key_openssl.cc b/crypto/ec_private_key_openssl.cc
index 45657a7..35403f3 100644
--- a/crypto/ec_private_key_openssl.cc
+++ b/crypto/ec_private_key_openssl.cc
@@ -88,7 +88,7 @@ ECPrivateKey::~ECPrivateKey() {
ECPrivateKey* ECPrivateKey::Copy() const {
scoped_ptr<ECPrivateKey> copy(new ECPrivateKey);
if (key_)
- copy->key_ = EVP_PKEY_dup(key_);
+ copy->key_ = EVP_PKEY_up_ref(key_);
return copy.release();
}
diff --git a/crypto/rsa_private_key_openssl.cc b/crypto/rsa_private_key_openssl.cc
index 9f8352d..52a0a7a 100644
--- a/crypto/rsa_private_key_openssl.cc
+++ b/crypto/rsa_private_key_openssl.cc
@@ -103,7 +103,7 @@ RSAPrivateKey* RSAPrivateKey::CreateFromKey(EVP_PKEY* key) {
if (EVP_PKEY_type(key->type) != EVP_PKEY_RSA)
return NULL;
RSAPrivateKey* copy = new RSAPrivateKey();
- copy->key_ = EVP_PKEY_dup(key);
+ copy->key_ = EVP_PKEY_up_ref(key);
return copy;
}