mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-02 04:04:39 +02:00
Check for XREAD when XFREAD fails
On Windows we would always fail with `NOT_COMPILED_IN` when reading a file BIO.
This commit is contained in:
@@ -230,15 +230,15 @@ int wolfSSL_BIO_read(WOLFSSL_BIO* bio, void* buf, int len)
|
|||||||
if (bio->ptr) {
|
if (bio->ptr) {
|
||||||
ret = (int)XFREAD(buf, 1, len, (XFILE)bio->ptr);
|
ret = (int)XFREAD(buf, 1, len, (XFILE)bio->ptr);
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
#if !defined(USE_WINDOWS_API) && !defined(NO_WOLFSSL_DIR) && \
|
#if !defined(USE_WINDOWS_API) && !defined(NO_WOLFSSL_DIR) && \
|
||||||
!defined(WOLFSSL_NUCLEUS) && !defined(WOLFSSL_NUCLEUS_1_2)
|
!defined(WOLFSSL_NUCLEUS) && !defined(WOLFSSL_NUCLEUS_1_2)
|
||||||
else {
|
|
||||||
ret = (int)XREAD(bio->num, buf, len);
|
ret = (int)XREAD(bio->num, buf, len);
|
||||||
}
|
|
||||||
#else
|
#else
|
||||||
WOLFSSL_MSG("No file pointer and XREAD not enabled");
|
WOLFSSL_MSG("No file pointer and XREAD not enabled");
|
||||||
ret = NOT_COMPILED_IN;
|
ret = NOT_COMPILED_IN;
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
WOLFSSL_MSG("WOLFSSL_BIO_FILE used with NO_FILESYSTEM");
|
WOLFSSL_MSG("WOLFSSL_BIO_FILE used with NO_FILESYSTEM");
|
||||||
ret = NOT_COMPILED_IN;
|
ret = NOT_COMPILED_IN;
|
||||||
|
Reference in New Issue
Block a user