diff options
-rw-r--r-- | src/lib/libcrypto/ec/ec_ameth.c | 10 | ||||
-rw-r--r-- | src/lib/libssl/src/crypto/ec/ec_ameth.c | 10 |
2 files changed, 4 insertions, 16 deletions
diff --git a/src/lib/libcrypto/ec/ec_ameth.c b/src/lib/libcrypto/ec/ec_ameth.c index 6b4dfdec46..b4ae1c0623 100644 --- a/src/lib/libcrypto/ec/ec_ameth.c +++ b/src/lib/libcrypto/ec/ec_ameth.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ec_ameth.c,v 1.13 2014/07/13 15:47:51 logan Exp $ */ | 1 | /* $OpenBSD: ec_ameth.c,v 1.14 2014/10/07 04:58:50 miod Exp $ */ |
2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
3 | * project 2006. | 3 | * project 2006. |
4 | */ | 4 | */ |
@@ -393,13 +393,7 @@ ec_missing_parameters(const EVP_PKEY * pkey) | |||
393 | static int | 393 | static int |
394 | ec_copy_parameters(EVP_PKEY * to, const EVP_PKEY * from) | 394 | ec_copy_parameters(EVP_PKEY * to, const EVP_PKEY * from) |
395 | { | 395 | { |
396 | EC_GROUP *group = EC_GROUP_dup(EC_KEY_get0_group(from->pkey.ec)); | 396 | return EC_KEY_set_group(to->pkey.ec, EC_KEY_get0_group(from->pkey.ec)); |
397 | if (group == NULL) | ||
398 | return 0; | ||
399 | if (EC_KEY_set_group(to->pkey.ec, group) == 0) | ||
400 | return 0; | ||
401 | EC_GROUP_free(group); | ||
402 | return 1; | ||
403 | } | 397 | } |
404 | 398 | ||
405 | static int | 399 | static int |
diff --git a/src/lib/libssl/src/crypto/ec/ec_ameth.c b/src/lib/libssl/src/crypto/ec/ec_ameth.c index 6b4dfdec46..b4ae1c0623 100644 --- a/src/lib/libssl/src/crypto/ec/ec_ameth.c +++ b/src/lib/libssl/src/crypto/ec/ec_ameth.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ec_ameth.c,v 1.13 2014/07/13 15:47:51 logan Exp $ */ | 1 | /* $OpenBSD: ec_ameth.c,v 1.14 2014/10/07 04:58:50 miod Exp $ */ |
2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
3 | * project 2006. | 3 | * project 2006. |
4 | */ | 4 | */ |
@@ -393,13 +393,7 @@ ec_missing_parameters(const EVP_PKEY * pkey) | |||
393 | static int | 393 | static int |
394 | ec_copy_parameters(EVP_PKEY * to, const EVP_PKEY * from) | 394 | ec_copy_parameters(EVP_PKEY * to, const EVP_PKEY * from) |
395 | { | 395 | { |
396 | EC_GROUP *group = EC_GROUP_dup(EC_KEY_get0_group(from->pkey.ec)); | 396 | return EC_KEY_set_group(to->pkey.ec, EC_KEY_get0_group(from->pkey.ec)); |
397 | if (group == NULL) | ||
398 | return 0; | ||
399 | if (EC_KEY_set_group(to->pkey.ec, group) == 0) | ||
400 | return 0; | ||
401 | EC_GROUP_free(group); | ||
402 | return 1; | ||
403 | } | 397 | } |
404 | 398 | ||
405 | static int | 399 | static int |