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

Unified Diff: crypto/ec_private_key.cc

Issue 2113143004: Switch to OpenSSL's |EVP_PKEY_up_ref| signature. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 | « no previous file | crypto/rsa_private_key.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: crypto/ec_private_key.cc
diff --git a/crypto/ec_private_key.cc b/crypto/ec_private_key.cc
index 8f3c4110ace794241dd5d22af79f60346027159c..a8005bcf68cbf63e604dfb76314fb82c27f5986f 100644
--- a/crypto/ec_private_key.cc
+++ b/crypto/ec_private_key.cc
@@ -146,8 +146,10 @@ std::unique_ptr<ECPrivateKey> ECPrivateKey::CreateFromEncryptedPrivateKeyInfo(
std::unique_ptr<ECPrivateKey> ECPrivateKey::Copy() const {
std::unique_ptr<ECPrivateKey> copy(new ECPrivateKey());
- if (key_)
- copy->key_ = EVP_PKEY_up_ref(key_);
+ if (key_) {
+ EVP_PKEY_up_ref(key_);
+ copy->key_ = key_;
+ }
return copy;
}
« no previous file with comments | « no previous file | crypto/rsa_private_key.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698