summaryrefslogtreecommitdiffstats
path: root/crypto/ec/ec_curve.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2016-02-01 18:15:57 +0000
committerDr. Stephen Henson <steve@openssl.org>2016-02-28 22:54:53 +0000
commit6903e2e7e9a47bb350920ae640287cf9f43a22ce (patch)
tree7cbbc665d681b79500d0c60aefdb3d745518896a /crypto/ec/ec_curve.c
parent474d84ec81d6926698d27a2cbbbbe2961ecf6541 (diff)
Extended EC_METHOD customisation support.
Add support for optional overrides of various private key operations in EC_METHOD. Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Emilia Käsper <emilia@openssl.org>
Diffstat (limited to 'crypto/ec/ec_curve.c')
-rw-r--r--crypto/ec/ec_curve.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/crypto/ec/ec_curve.c b/crypto/ec/ec_curve.c
index 107beb5fb3..befe59d2bc 100644
--- a/crypto/ec/ec_curve.c
+++ b/crypto/ec/ec_curve.c
@@ -3037,6 +3037,10 @@ static EC_GROUP *ec_group_new_from_data(const ec_list_element curve)
const EC_CURVE_DATA *data;
const unsigned char *params;
+ /* If no curve data curve method must handle everything */
+ if (curve.data == NULL)
+ return EC_GROUP_new(curve.meth != NULL ? curve.meth() : NULL);
+
if ((ctx = BN_CTX_new()) == NULL) {
ECerr(EC_F_EC_GROUP_NEW_FROM_DATA, ERR_R_MALLOC_FAILURE);
goto err;