summaryrefslogtreecommitdiffstats
path: root/crypto/ec
diff options
context:
space:
mode:
authorShane Lontis <shane.lontis@oracle.com>2020-09-15 14:45:49 +1000
committerShane Lontis <shane.lontis@oracle.com>2020-09-19 18:21:10 +1000
commit7889e7aef821c0c9917188d59f53253645c07928 (patch)
tree895a1eb9eda2dbea45a7499e30f20a2b427d63ec /crypto/ec
parentf8e747471ebb5e6d65264de91e26fbc439841bc4 (diff)
Fix ec keygen so that it passes the library context to SSL_SELF_TEST_get_callback().
This was written before the ec key contained a library context, now that it contains a libctx it can be passed correctly to the callback. Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/12877)
Diffstat (limited to 'crypto/ec')
-rw-r--r--crypto/ec/ec_key.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/crypto/ec/ec_key.c b/crypto/ec/ec_key.c
index f1f325237e..75c3588a95 100644
--- a/crypto/ec/ec_key.c
+++ b/crypto/ec/ec_key.c
@@ -256,7 +256,7 @@ int ossl_ec_key_gen(EC_KEY *eckey)
* fails then the keypair is not generated,
* Returns 1 if the keypair was generated or 0 otherwise.
*/
-int ec_generate_key(OPENSSL_CTX *libctx, EC_KEY *eckey, int pairwise_test)
+static int ec_generate_key(EC_KEY *eckey, int pairwise_test)
{
int ok = 0;
BIGNUM *priv_key = NULL;
@@ -325,7 +325,7 @@ int ec_generate_key(OPENSSL_CTX *libctx, EC_KEY *eckey, int pairwise_test)
OSSL_CALLBACK *cb = NULL;
void *cbarg = NULL;
- OSSL_SELF_TEST_get_callback(libctx, &cb, &cbarg);
+ OSSL_SELF_TEST_get_callback(eckey->libctx, &cb, &cbarg);
ok = ecdsa_keygen_pairwise_test(eckey, cb, cbarg);
}
err:
@@ -345,7 +345,7 @@ err:
int ec_key_simple_generate_key(EC_KEY *eckey)
{
- return ec_generate_key(NULL, eckey, 0);
+ return ec_generate_key(eckey, 0);
}
int ec_key_simple_generate_public_key(EC_KEY *eckey)