diff --git a/apps/dhparam.c b/apps/dhparam.c index db9e964cf0c5f..0e90698cd6940 100644 --- a/apps/dhparam.c +++ b/apps/dhparam.c @@ -194,7 +194,7 @@ int dhparam_main(int argc, char **argv) "Generating %s parameters, %d bit long %sprime\n", alg, num, dsaparam ? "" : "safe "); - if (!EVP_PKEY_paramgen_init(ctx)) { + if (EVP_PKEY_paramgen_init(ctx) <= 0) { BIO_printf(bio_err, "Error, unable to initialise %s parameters\n", alg); diff --git a/test/acvp_test.c b/test/acvp_test.c index 4b6632e689046..89b5400feafb0 100644 --- a/test/acvp_test.c +++ b/test/acvp_test.c @@ -340,7 +340,7 @@ static EVP_PKEY *dsa_paramgen(int L, int N) EVP_PKEY *param_key = NULL; if (!TEST_ptr(paramgen_ctx = EVP_PKEY_CTX_new_from_name(libctx, "DSA", NULL)) - || !TEST_true(EVP_PKEY_paramgen_init(paramgen_ctx)) + || !TEST_int_gt(EVP_PKEY_paramgen_init(paramgen_ctx), 0) || !TEST_true(EVP_PKEY_CTX_set_dsa_paramgen_bits(paramgen_ctx, L)) || !TEST_true(EVP_PKEY_CTX_set_dsa_paramgen_q_bits(paramgen_ctx, N)) || !TEST_true(EVP_PKEY_paramgen(paramgen_ctx, ¶m_key))) @@ -416,7 +416,7 @@ static int dsa_paramgen_test(int id) const struct dsa_paramgen_st *tst = &dsa_paramgen_data[id]; if (!TEST_ptr(paramgen_ctx = EVP_PKEY_CTX_new_from_name(libctx, "DSA", NULL)) - || !TEST_true(EVP_PKEY_paramgen_init(paramgen_ctx)) + || !TEST_int_gt(EVP_PKEY_paramgen_init(paramgen_ctx), 0) || !TEST_true(EVP_PKEY_CTX_set_dsa_paramgen_bits(paramgen_ctx, tst->L)) || !TEST_true(EVP_PKEY_CTX_set_dsa_paramgen_q_bits(paramgen_ctx, tst->N)) || !TEST_true(EVP_PKEY_paramgen(paramgen_ctx, ¶m_key)) diff --git a/test/evp_extra_test.c b/test/evp_extra_test.c index 69cab3194b025..8d053ddc93d0e 100644 --- a/test/evp_extra_test.c +++ b/test/evp_extra_test.c @@ -1695,7 +1695,7 @@ static int test_EC_keygen_with_enc(int idx) /* Create key parameters */ if (!TEST_ptr(pctx = EVP_PKEY_CTX_new_from_name(testctx, "EC", NULL)) - || !TEST_true(EVP_PKEY_paramgen_init(pctx)) + || !TEST_int_gt(EVP_PKEY_paramgen_init(pctx), 0) || !TEST_true(EVP_PKEY_CTX_set_group_name(pctx, "P-256")) || !TEST_true(EVP_PKEY_CTX_set_ec_param_enc(pctx, enc)) || !TEST_true(EVP_PKEY_paramgen(pctx, ¶ms))