Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16783)
ctx = EVP_PKEY_CTX_new_from_name(NULL, "DHX", NULL);
if (ctx == NULL
- || !EVP_PKEY_fromdata_init(ctx)
+ || EVP_PKEY_fromdata_init(ctx) <= 0
|| !EVP_PKEY_fromdata(ctx, &pkey, EVP_PKEY_KEY_PARAMETERS, params)) {
BIO_printf(bio_err, "Error, failed to set DH parameters\n");
goto err;
if (ctx == NULL)
goto err;
- if (!EVP_PKEY_fromdata_init(ctx)) {
+ if (EVP_PKEY_fromdata_init(ctx) <= 0) {
ERR_raise(ERR_LIB_EVP, EVP_R_KEY_SETUP_FAILED);
goto err;
}
OSSL_PARAM *params = NULL;
EVP_PKEY *dhpkey = NULL;
- if (pctx == NULL || !EVP_PKEY_fromdata_init(pctx))
+ if (pctx == NULL || EVP_PKEY_fromdata_init(pctx) <= 0)
goto err;
if ((tmpl = OSSL_PARAM_BLD_new()) == NULL