diff options
author | Dr. David von Oheimb <David.von.Oheimb@siemens.com> | 2021-03-20 13:49:08 +0100 |
---|---|---|
committer | Dr. David von Oheimb <David.von.Oheimb@siemens.com> | 2021-05-11 12:46:42 +0200 |
commit | f925315203f77d0241183ccabfc784d259b0a152 (patch) | |
tree | 2d92c75d7e19d48de1ed8da32b724b3603f5a3c6 /test/dsatest.c | |
parent | Tests for creating req from PKCS8 keys with extra attrs (diff) | |
download | openssl-f925315203f77d0241183ccabfc784d259b0a152.tar.xz openssl-f925315203f77d0241183ccabfc784d259b0a152.zip |
Add convenience functions and macros for asymmetric key generation
Add EVP_PKEY_gen(), EVP_PKEY_Q_gen(), EVP_RSA_gen(), and EVP_EC_gen().
Also export auxiliary function OSSL_EC_curve_nid2name()
and improve deprecation info on RSA and EC key generation/management functions.
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/14695)
Diffstat (limited to 'test/dsatest.c')
-rw-r--r-- | test/dsatest.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/dsatest.c b/test/dsatest.c index 56693dd139..533fba1cbc 100644 --- a/test/dsatest.c +++ b/test/dsatest.c @@ -256,10 +256,10 @@ static int dsa_keygen_test(void) sizeof(seed_data))) || !TEST_true(EVP_PKEY_CTX_set_dsa_paramgen_md_props(pg_ctx, "SHA256", "")) - || !TEST_int_gt(EVP_PKEY_gen(pg_ctx, ¶m_key), 0) + || !TEST_int_gt(EVP_PKEY_generate(pg_ctx, ¶m_key), 0) || !TEST_ptr(kg_ctx = EVP_PKEY_CTX_new_from_pkey(NULL, param_key, NULL)) || !TEST_int_gt(EVP_PKEY_keygen_init(kg_ctx), 0) - || !TEST_int_gt(EVP_PKEY_gen(kg_ctx, &key), 0)) + || !TEST_int_gt(EVP_PKEY_generate(kg_ctx, &key), 0)) goto end; if (!TEST_true(EVP_PKEY_get_bn_param(key, OSSL_PKEY_PARAM_FFC_P, &p_out)) @@ -313,7 +313,7 @@ static int test_dsa_default_paramgen_validate(int i) && TEST_int_gt(EVP_PKEY_paramgen_init(gen_ctx), 0) && (i == 0 || TEST_true(EVP_PKEY_CTX_set_dsa_paramgen_bits(gen_ctx, 512))) - && TEST_int_gt(EVP_PKEY_gen(gen_ctx, ¶ms), 0) + && TEST_int_gt(EVP_PKEY_generate(gen_ctx, ¶ms), 0) && TEST_ptr(check_ctx = EVP_PKEY_CTX_new_from_pkey(NULL, params, NULL)) && TEST_int_gt(EVP_PKEY_param_check(check_ctx), 0); |