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>
This commit is contained in:
parent
08dc68d510
commit
785e07b23d
@ -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)) {
|
||||
|
Loading…
Reference in New Issue
Block a user