aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/ec/ec_kmeth.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2015-10-23 19:10:24 +0100
committerDr. Stephen Henson <steve@openssl.org>2015-12-09 22:09:18 +0000
commit0d6ff6d3d1a19d491ec9a002b808cec23ca12107 (patch)
tree27f1758d36546c76f4ffef22e41d85788139bc63 /crypto/ec/ec_kmeth.c
parent5196641617ceef00af51128eb1db0083097d95e7 (diff)
downloadopenssl-0d6ff6d3d1a19d491ec9a002b808cec23ca12107.tar.gz
EC_KEY_METHOD init and finish support
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'crypto/ec/ec_kmeth.c')
-rw-r--r--crypto/ec/ec_kmeth.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/crypto/ec/ec_kmeth.c b/crypto/ec/ec_kmeth.c
index 4904989d63..77b4443fa3 100644
--- a/crypto/ec/ec_kmeth.c
+++ b/crypto/ec/ec_kmeth.c
@@ -63,6 +63,7 @@
static const EC_KEY_METHOD openssl_ec_key_method = {
"OpenSSL EC_KEY method",
0,
+ 0,0,
ossl_ec_key_gen,
ossl_ecdh_compute_key
};
@@ -120,7 +121,11 @@ EC_KEY *EC_KEY_new_method(ENGINE *engine)
ret->version = 1;
ret->conv_form = POINT_CONVERSION_UNCOMPRESSED;
ret->references = 1;
- return (ret);
+ if (ret->meth->init && ret->meth->init(ret) == 0) {
+ EC_KEY_free(ret);
+ return NULL;
+ }
+ return ret;
}
int ECDH_compute_key(void *out, size_t outlen, const EC_POINT *pub_key,