summaryrefslogtreecommitdiffstats
path: root/crypto/rsa_private_key_openssl.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/rsa_private_key_openssl.cc')
-rw-r--r--crypto/rsa_private_key_openssl.cc2
1 files changed, 1 insertions, 1 deletions
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;
}