summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2014-10-07 04:58:51 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2014-10-07 04:58:51 +0000
commit28334dde54a4dedbbefc715d0363711e877257f1 (patch)
tree0becb30b164b6c67ce5539672b98690a91165dab /lib
parent1238b990bf7058667f9931bbf43e478452620d15 (diff)
EC_KEY_set_group() does an EC_GROUP_dup() of its argument, so we don't
need to do it in ec_copy_parameters() prior to invoking EC_KEY_set_group(). ok doug@ jsing@
Diffstat (limited to 'lib')
-rw-r--r--lib/libssl/src/crypto/ec/ec_ameth.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/lib/libssl/src/crypto/ec/ec_ameth.c b/lib/libssl/src/crypto/ec/ec_ameth.c
index 6b4dfdec46a..b4ae1c06237 100644
--- a/lib/libssl/src/crypto/ec/ec_ameth.c
+++ b/lib/libssl/src/crypto/ec/ec_ameth.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ec_ameth.c,v 1.13 2014/07/13 15:47:51 logan Exp $ */
+/* $OpenBSD: ec_ameth.c,v 1.14 2014/10/07 04:58:50 miod Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project 2006.
*/
@@ -393,13 +393,7 @@ ec_missing_parameters(const EVP_PKEY * pkey)
static int
ec_copy_parameters(EVP_PKEY * to, const EVP_PKEY * from)
{
- EC_GROUP *group = EC_GROUP_dup(EC_KEY_get0_group(from->pkey.ec));
- if (group == NULL)
- return 0;
- if (EC_KEY_set_group(to->pkey.ec, group) == 0)
- return 0;
- EC_GROUP_free(group);
- return 1;
+ return EC_KEY_set_group(to->pkey.ec, EC_KEY_get0_group(from->pkey.ec));
}
static int