mirror of
https://github.com/brunoos/luasec.git
synced 2024-12-27 12:58:21 +01:00
Expand workaround for zero errno to OpenSSL 3.0.x
Encountered the bug in #172 after upgrading to OpenSSL 3.0.9, so it appears to still be present. Occurs when writing to a connection that has been closed by the remote.
This commit is contained in:
parent
fddde111f7
commit
a2b211f847
@ -48,8 +48,8 @@
|
|||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
#if !defined(LIBRESSL_VERSION_NUMBER) && ((OPENSSL_VERSION_NUMBER & 0xFFFFF000L) == 0x10101000L)
|
#if !defined(LIBRESSL_VERSION_NUMBER) && ((OPENSSL_VERSION_NUMBER & 0xFFFFF000L) == 0x10101000L || (OPENSSL_VERSION_NUMBER & 0xFFFFF000L) == 0x30000000L)
|
||||||
#define LSEC_OPENSSL_1_1_1
|
#define LSEC_OPENSSL_ERRNO_BUG
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
@ -47,8 +47,8 @@ static int lsec_socket_error()
|
|||||||
#if defined(WIN32)
|
#if defined(WIN32)
|
||||||
return WSAGetLastError();
|
return WSAGetLastError();
|
||||||
#else
|
#else
|
||||||
#if defined(LSEC_OPENSSL_1_1_1)
|
#if defined(LSEC_OPENSSL_ERRNO_BUG)
|
||||||
// Bug in OpenSSL 1.1.1
|
// Bug in OpenSSL
|
||||||
if (errno == 0)
|
if (errno == 0)
|
||||||
return LSEC_IO_SSL;
|
return LSEC_IO_SSL;
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user