From 150481699f681d4e2cbb327efcd96b659c9fdb2c Mon Sep 17 00:00:00 2001 From: Takashi Kojo Date: Mon, 6 Feb 2017 16:07:58 +0900 Subject: [PATCH] add BIO_new_file: ssl.c, tests/api.c --- tests/api.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/api.c b/tests/api.c index 06c0305c8..ffb0db4b2 100644 --- a/tests/api.c +++ b/tests/api.c @@ -14550,6 +14550,12 @@ static void test_wolfSSL_BIO(void) BIO_free(f_bio1); BIO_free(f_bio2); + + AssertNotNull(f_bio1 = BIO_new_file(svrCert, "rwb")); + AssertIntEQ((int)BIO_set_mem_eof_return(f_bio1, -1), 0); + AssertIntEQ(BIO_read(f_bio1, cert, sizeof(cert)), sizeof(cert)); + BIO_free(f_bio1); + } #endif /* !defined(NO_FILESYSTEM) */