diff options
author | Peiwei Hu <jlu.hpw@foxmail.com> | 2021-11-15 00:41:21 +0800 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2021-11-16 17:34:36 +0100 |
commit | d05340770a9cdc6acfe7d4d3a8acbe1165a100ee (patch) | |
tree | 604bc26905e3d1d099174575cc906ebda1143303 /ssl | |
parent | 20ca6f0ad1d621f7cd2b939b7e2e58ba29df2e08 (diff) |
BIO_read_filename: fix return check
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/17033)
(cherry picked from commit e3f0362407f6f40e413d6dcb35888514dbaed6f8)
Diffstat (limited to 'ssl')
-rw-r--r-- | ssl/ssl_cert.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ssl/ssl_cert.c b/ssl/ssl_cert.c index 547e9b9ccd..34351c161c 100644 --- a/ssl/ssl_cert.c +++ b/ssl/ssl_cert.c @@ -625,7 +625,7 @@ STACK_OF(X509_NAME) *SSL_load_client_CA_file_ex(const char *file, ERR_raise(ERR_LIB_SSL, ERR_R_MALLOC_FAILURE); goto err; } - if (!BIO_read_filename(in, file)) + if (BIO_read_filename(in, file) <= 0) goto err; /* Internally lh_X509_NAME_retrieve() needs the libctx to retrieve SHA1 */ @@ -696,7 +696,7 @@ int SSL_add_file_cert_subjects_to_stack(STACK_OF(X509_NAME) *stack, goto err; } - if (!BIO_read_filename(in, file)) + if (BIO_read_filename(in, file) <= 0) goto err; for (;;) { |