summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Langley <agl@google.com>2015-05-15 16:26:11 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-05-15 16:26:11 +0000
commitfa32bda8a343ff3d1fccbda3846e05f01f2746d6 (patch)
tree2951568da194370e227203276a5e919b9a4c65f2
parentd4c52f48614a22fad2a23873322156cf9b109c05 (diff)
parent21c70997ab3c62b97960fd66f02b619850e5d978 (diff)
downloadexternal_boringssl-fa32bda8a343ff3d1fccbda3846e05f01f2746d6.zip
external_boringssl-fa32bda8a343ff3d1fccbda3846e05f01f2746d6.tar.gz
external_boringssl-fa32bda8a343ff3d1fccbda3846e05f01f2746d6.tar.bz2
am 21c70997: Copy ecdsa_meth in EC_KEY_copy.
* commit '21c70997ab3c62b97960fd66f02b619850e5d978': Copy ecdsa_meth in EC_KEY_copy.
-rw-r--r--src/crypto/ec/ec_key.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/crypto/ec/ec_key.c b/src/crypto/ec/ec_key.c
index 3652ba5..348ec46 100644
--- a/src/crypto/ec/ec_key.c
+++ b/src/crypto/ec/ec_key.c
@@ -201,6 +201,11 @@ EC_KEY *EC_KEY_copy(EC_KEY *dest, const EC_KEY *src) {
}
}
/* copy method/extra data */
+ if (src->ecdsa_meth) {
+ METHOD_unref(dest->ecdsa_meth);
+ dest->ecdsa_meth = src->ecdsa_meth;
+ METHOD_ref(dest->ecdsa_meth);
+ }
CRYPTO_free_ex_data(&g_ex_data_class, dest, &dest->ex_data);
if (!CRYPTO_dup_ex_data(&g_ex_data_class, &dest->ex_data,
&src->ex_data)) {