summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorPeiwei Hu <jlu.hpw@foxmail.com>2021-11-15 00:41:21 +0800
committerTomas Mraz <tomas@openssl.org>2021-11-16 17:34:36 +0100
commitd05340770a9cdc6acfe7d4d3a8acbe1165a100ee (patch)
tree604bc26905e3d1d099174575cc906ebda1143303 /test
parent20ca6f0ad1d621f7cd2b939b7e2e58ba29df2e08 (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 'test')
-rw-r--r--test/sslapitest.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/sslapitest.c b/test/sslapitest.c
index 3257e1ee36..4017d47a77 100644
--- a/test/sslapitest.c
+++ b/test/sslapitest.c
@@ -7978,7 +7978,7 @@ static int cert_cb(SSL *s, void *arg)
if (!TEST_ptr(chain))
goto out;
if (!TEST_ptr(in = BIO_new(BIO_s_file()))
- || !TEST_int_ge(BIO_read_filename(in, rootfile), 0)
+ || !TEST_int_gt(BIO_read_filename(in, rootfile), 0)
|| !TEST_ptr(rootx = X509_new_ex(libctx, NULL))
|| !TEST_ptr(PEM_read_bio_X509(in, &rootx, NULL, NULL))
|| !TEST_true(sk_X509_push(chain, rootx)))
@@ -7986,13 +7986,13 @@ static int cert_cb(SSL *s, void *arg)
rootx = NULL;
BIO_free(in);
if (!TEST_ptr(in = BIO_new(BIO_s_file()))
- || !TEST_int_ge(BIO_read_filename(in, ecdsacert), 0)
+ || !TEST_int_gt(BIO_read_filename(in, ecdsacert), 0)
|| !TEST_ptr(x509 = X509_new_ex(libctx, NULL))
|| !TEST_ptr(PEM_read_bio_X509(in, &x509, NULL, NULL)))
goto out;
BIO_free(in);
if (!TEST_ptr(in = BIO_new(BIO_s_file()))
- || !TEST_int_ge(BIO_read_filename(in, ecdsakey), 0)
+ || !TEST_int_gt(BIO_read_filename(in, ecdsakey), 0)
|| !TEST_ptr(pkey = PEM_read_bio_PrivateKey_ex(in, NULL,
NULL, NULL,
libctx, NULL)))