From a8be42ef4de786b4dacdc175419df92ab0193ed9 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Wed, 8 Jan 2025 19:13:37 +0100 Subject: ssl: Set an error when we receive SSL_ERROR_SYSCALL The OpenSSL docs say: > For socket I/O on Unix systems, consult errno for details but also: > This value can also be returned for other errors, > check the error queue for details. This means it's possible errno isn't set, in which case we may appear to have reached an EOF when we did not. --- methods/connect.cc | 1 + 1 file changed, 1 insertion(+) (limited to 'methods') diff --git a/methods/connect.cc b/methods/connect.cc index b00e73eb7..c685ac031 100644 --- a/methods/connect.cc +++ b/methods/connect.cc @@ -849,6 +849,7 @@ struct TlsFd final : public MethodFd break; case SSL_ERROR_SYSCALL: broken = true; + _error->Errno("openssl", "OpenSSL system call error: %s\n", ssl_strerr()); break; case SSL_ERROR_SSL: broken = true; -- cgit v1.2.3-70-g09d2