summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Langley <agl@google.com>2015-05-14 14:07:30 -0700
committerAdam Langley <agl@google.com>2015-05-19 12:15:58 -0700
commit3ca955adbf31e6991e12f19f7c082b780e424172 (patch)
treebf34d1149be8ab2e90f3b1c1c509e5d031d3ee36
parentf5cea4e0c1c842a9de02ce39cd6ff7ae66363b21 (diff)
downloadexternal_boringssl-3ca955adbf31e6991e12f19f7c082b780e424172.zip
external_boringssl-3ca955adbf31e6991e12f19f7c082b780e424172.tar.gz
external_boringssl-3ca955adbf31e6991e12f19f7c082b780e424172.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)) {