]> git.ipfire.org Git - people/ms/strongswan.git/commit
tls-socket: Change how EOF of the underlying socket is handled
authorTobias Brunner <tobias@strongswan.org>
Fri, 28 Aug 2020 09:56:36 +0000 (11:56 +0200)
committerTobias Brunner <tobias@strongswan.org>
Fri, 12 Feb 2021 10:45:44 +0000 (11:45 +0100)
commit27360d34076c5d780990d409c468790b9bbbe37c
tree61c23a861d9e59a60ca5a45f1d6f45ea1816ff6b
parentbfcb49b3935b38f580c34451268483025bc3fba7
tls-socket: Change how EOF of the underlying socket is handled

With the previous code, there was an issue when replying to TLS 1.3
post-handshake messages.  In this case, SUCCESS is eventually returned
from build(), however, no actual data has been received so in_done is 0.
This was interpreted as EOF, plain_eof was set to TRUE and no further data
was read from the socket afterwards.

Returning SUCCESS from build() if the exchange is initiated by
write_(), as is the case with the finished reply, never was a problem
because there the return value of 0 is not interpreted as EOF.
src/libtls/tls_socket.c