summaryrefslogtreecommitdiffstats
path: root/ssl/s3_lib.c
diff options
context:
space:
mode:
authorPeiwei Hu <jlu.hpw@foxmail.com>2022-05-24 23:27:49 +0800
committerTomas Mraz <tomas@openssl.org>2022-06-02 11:06:35 +0200
commit56876ae952b96b4a83266f6b2ec1393f599015d6 (patch)
tree6e3f1b98f09627be00ac2ba62e8ee5012be3c449 /ssl/s3_lib.c
parent1c5a4e3b5e05494876ebba9d8272d2cbca1e20a3 (diff)
Fix the erroneous checks of EVP_PKEY_CTX_set_group_name
Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/18399)
Diffstat (limited to 'ssl/s3_lib.c')
-rw-r--r--ssl/s3_lib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ssl/s3_lib.c b/ssl/s3_lib.c
index 5b9d21b566..1091b8831d 100644
--- a/ssl/s3_lib.c
+++ b/ssl/s3_lib.c
@@ -4720,7 +4720,7 @@ EVP_PKEY *ssl_generate_pkey_group(SSL *s, uint16_t id)
SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_EVP_LIB);
goto err;
}
- if (!EVP_PKEY_CTX_set_group_name(pctx, ginf->realname)) {
+ if (EVP_PKEY_CTX_set_group_name(pctx, ginf->realname) <= 0) {
SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_EVP_LIB);
goto err;
}
@@ -4754,7 +4754,7 @@ EVP_PKEY *ssl_generate_param_group(SSL *s, uint16_t id)
goto err;
if (EVP_PKEY_paramgen_init(pctx) <= 0)
goto err;
- if (!EVP_PKEY_CTX_set_group_name(pctx, ginf->realname)) {
+ if (EVP_PKEY_CTX_set_group_name(pctx, ginf->realname) <= 0) {
SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_EVP_LIB);
goto err;
}