diff options
author | Jiasheng Jiang <jiasheng@purdue.edu> | 2024-03-22 18:09:18 +0000 |
---|---|---|
committer | Neil Horman <nhorman@openssl.org> | 2024-04-02 10:31:10 -0400 |
commit | e53a7ccd11c6aef965c50335187a473540819390 (patch) | |
tree | 52d4f9ba755812d9db427b7adec2d06a0cc0046f /ssl | |
parent | 165797c7d829aa699f5cfdea4969cad0916e8cdf (diff) |
Alter the check
Alter the check since 0 md size is an error.
Signed-off-by: Jiasheng Jiang <jiasheng@purdue.edu>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
(Merged from https://github.com/openssl/openssl/pull/23940)
Diffstat (limited to 'ssl')
-rw-r--r-- | ssl/ssl_lib.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c index af8b637531..fa78906376 100644 --- a/ssl/ssl_lib.c +++ b/ssl/ssl_lib.c @@ -297,7 +297,7 @@ static int dane_tlsa_add(SSL_DANE *dane, if (md != NULL) { mdsize = EVP_MD_get_size(md); - if (mdsize < 0 || dlen != (size_t)mdsize) { + if (mdsize <= 0 || dlen != (size_t)mdsize) { ERR_raise(ERR_LIB_SSL, SSL_R_DANE_TLSA_BAD_DIGEST_LENGTH); return 0; } |