summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Langley <agl@google.com>2015-05-14 14:07:30 -0700
committerShawn Willden <swillden@google.com>2015-05-15 12:22:35 +0000
commit21c70997ab3c62b97960fd66f02b619850e5d978 (patch)
tree2951568da194370e227203276a5e919b9a4c65f2
parentfc104df40ab7812f749993809b873c139da3d959 (diff)
downloadexternal_boringssl-21c70997ab3c62b97960fd66f02b619850e5d978.zip
external_boringssl-21c70997ab3c62b97960fd66f02b619850e5d978.tar.gz
external_boringssl-21c70997ab3c62b97960fd66f02b619850e5d978.tar.bz2
Copy ecdsa_meth in EC_KEY_copy.
This change imports 785e07b23d965e1e984c2ee9f6a0dbe06d3d658e from upstream into Android. Change-Id: I5fb67b5c39d62d6f2a2dd6980cc97569a7686eac (cherry picked from commit 5a0d510b257df371302288e9cc97f01f72b5b19b)
-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)) {