]> git.ipfire.org Git - thirdparty/bind9.git/commit
Handle buggy situations with SSL_ERROR_SYSCALL
authorArtem Boldariev <artem@boldariev.com>
Tue, 6 Apr 2021 17:57:45 +0000 (20:57 +0300)
committerArtem Boldariev <artem@boldariev.com>
Wed, 7 Apr 2021 08:21:08 +0000 (11:21 +0300)
commite6062210c7cdc6a3e0bde2214bad72103d3dec5f
treeae8d5cec8b5f8e8576321bff062680cff66e273a
parent6b121171a51a096fe9be01693a526156a3c2795f
Handle buggy situations with SSL_ERROR_SYSCALL

See "BUGS" section at:

https://www.openssl.org/docs/man1.1.1/man3/SSL_get_error.html

It is mentioned there that when TLS status equals SSL_ERROR_SYSCALL
AND errno == 0 it means that underlying transport layer returned EOF
prematurely.  However, we are managing the transport ourselves, so we
should just resume reading from the TCP socket.

It seems that this case has been handled properly on modern versions
of OpenSSL. That being said, the situation goes in line with the
manual: it is briefly mentioned there that SSL_ERROR_SYSCALL might be
returned not only in a case of low-level errors (like system call
failures).
lib/isc/netmgr/tlsstream.c