add BIO_new_file: ssl.c, tests/api.c

This commit is contained in:
Takashi Kojo
2017-02-06 16:07:58 +09:00
committed by Jacob Barthelmeh
parent 546d31c51c
commit 150481699f

View File

@ -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) */