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 06:21:39 -0600
commit5a0d510b257df371302288e9cc97f01f72b5b19b (patch)
treef55eb80ff64bb7181c5f49329c24cdcae17cceed
parente673846847f357d692682b4a7a80bda9a0e4d2e9 (diff)
downloadexternal_boringssl-5a0d510b257df371302288e9cc97f01f72b5b19b.zip
external_boringssl-5a0d510b257df371302288e9cc97f01f72b5b19b.tar.gz
external_boringssl-5a0d510b257df371302288e9cc97f01f72b5b19b.tar.bz2
Copy ecdsa_meth in EC_KEY_copy.
This change imports 785e07b23d965e1e984c2ee9f6a0dbe06d3d658e from upstream into Android. Change-Id: I5fb67b5c39d62d6f2a2dd6980cc97569a7686eac
-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)) {