summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/ec/ec_key.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/ec/ec_key.c')
-rw-r--r--src/lib/libcrypto/ec/ec_key.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/lib/libcrypto/ec/ec_key.c b/src/lib/libcrypto/ec/ec_key.c
index f57e078c7f..1d0a03ac88 100644
--- a/src/lib/libcrypto/ec/ec_key.c
+++ b/src/lib/libcrypto/ec/ec_key.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ec_key.c,v 1.23 2019/01/19 01:07:00 tb Exp $ */ 1/* $OpenBSD: ec_key.c,v 1.24 2019/01/19 01:12:48 tb Exp $ */
2/* 2/*
3 * Written by Nils Larsch for the OpenSSL project. 3 * Written by Nils Larsch for the OpenSSL project.
4 */ 4 */
@@ -247,9 +247,18 @@ EC_KEY_get_ex_data(const EC_KEY *r, int idx)
247 return CRYPTO_get_ex_data(&r->ex_data, idx); 247 return CRYPTO_get_ex_data(&r->ex_data, idx);
248} 248}
249 249
250int 250int
251EC_KEY_generate_key(EC_KEY *eckey) 251EC_KEY_generate_key(EC_KEY *eckey)
252{ 252{
253 if (eckey->meth->keygen != NULL)
254 return eckey->meth->keygen(eckey);
255 ECerror(EC_R_NOT_IMPLEMENTED);
256 return 0;
257}
258
259int
260ossl_ec_key_gen(EC_KEY *eckey)
261{
253 int ok = 0; 262 int ok = 0;
254 BN_CTX *ctx = NULL; 263 BN_CTX *ctx = NULL;
255 BIGNUM *priv_key = NULL, *order = NULL; 264 BIGNUM *priv_key = NULL, *order = NULL;