[openssl] openssl-3.0 update
tomas at openssl.org
tomas at openssl.org
Tue Nov 16 16:32:49 UTC 2021
The branch openssl-3.0 has been updated
via 84201d47b4a8f2c358f014448d89dfde5c6217fe (commit)
from ee3928f23175b4e7248b8e48d46a0bbe84ebb7da (commit)
- Log -----------------------------------------------------------------
commit 84201d47b4a8f2c358f014448d89dfde5c6217fe
Author: Peiwei Hu <jlu.hpw at foxmail.com>
Date: Sun Nov 14 23:52:56 2021 +0800
EVP_PKEY_paramgen_init: fix return check
Reviewed-by: Matt Caswell <matt at openssl.org>
Reviewed-by: Paul Dale <pauli at openssl.org>
Reviewed-by: Tomas Mraz <tomas at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/17030)
(cherry picked from commit 6e0b05f3008a3f22105fd2bed9314b0bfa381f93)
-----------------------------------------------------------------------
Summary of changes:
apps/dhparam.c | 2 +-
test/acvp_test.c | 4 ++--
test/evp_extra_test.c | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/apps/dhparam.c b/apps/dhparam.c
index db9e964cf0..0e90698cd6 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 4b6632e689..89b5400fea 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 7b3c4aee2c..ac989935d6 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))
More information about the openssl-commits
mailing list