Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/boringssl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/crypto/ec
diff options
context:
space:
mode:
authorShawn Willden <swillden@google.com>2015-05-14 22:25:02 +0300
committerAdam Langley <agl@google.com>2015-05-14 23:37:21 +0300
commit785e07b23d965e1e984c2ee9f6a0dbe06d3d658e (patch)
treeedac04b281f754e2d133b129542690cc9cc35941 /crypto/ec
parent08dc68d5100faecd9c39c425bec79241a07519a1 (diff)
Copy ecdsa_meth in EC_KEY_copy.
Change-Id: Ia97e76d6e5a5dc216a05741864c3d59b50d855bd Reviewed-on: https://boringssl-review.googlesource.com/4750 Reviewed-by: Adam Langley <agl@google.com>
Diffstat (limited to 'crypto/ec')
-rw-r--r--crypto/ec/ec_key.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/crypto/ec/ec_key.c b/crypto/ec/ec_key.c
index 3652ba51..348ec462 100644
--- a/crypto/ec/ec_key.c
+++ b/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)) {