Skip to content

Commit 3ebad5a

Browse files
committed
Fix Issue facebookarchive#11 - Incomplete SSL error reporting in TCPInterface.cpp
1 parent ba9e60b commit 3ebad5a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Source/TCPInterface.cpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -1366,8 +1366,10 @@ bool RemoteClient::InitSSL(SSL_CTX* ctx, SSL_METHOD *meth)
13661366
// http://www.openssl.org/docs/ssl/SSL_get_error.html
13671367
char buff[1024];
13681368
unsigned long ege = ERR_get_error();
1369-
if (ege==0)
1370-
printf("SSL_ERROR_SYSCALL SSL_get_error ret=\n", res);
1369+
if (ege==0 && res==0)
1370+
printf("SSL_ERROR_SYSCALL EOF in violation of the protocol\n");
1371+
else if (ege==0 && res==-1)
1372+
printf("SSL_ERROR_SYSCALL %s\n", strerror(errno));
13711373
else
13721374
printf("SSL_ERROR_SYSCALL %s\n", ERR_error_string(ege, buff));
13731375
}

0 commit comments

Comments
 (0)