Log Message:
-----------
ssl/bio_ssl.c: report EOF on SSL BIOs after receiving close_notify
BIO_get_line() can consume the final line of a TLS stream
and return 0 if the line doesn't end with a newline. After reading
close_notify, libssl doesn't read from the socket again.
Even if the peer has closed the socket, the socket BIO hasn't observed
EOF when the SSL BIO forwards BIO_eof() to it.
Backport the SSL BIO part of #29401. Record EOF
when SSL_get_error() reports SSL_ERROR_ZERO_RETURN for a read so callers
can see the clean TLS shutdown through BIO_eof().
Log Message:
-----------
test/sslapitest.cL test SSL BIO EOF after close_notify on TLS 1.2 and 1.3
A read with no data available should be retryable. Once the peer
sends close_notify, the next read should return 0 and the SSL BIO
should report EOF while the transport stays open.
Use a BIO pair for the transport. An empty memory BIO already
reports EOF on 3.5 and would hide the regression.