Restore SSL_shutdown() two step sequence.
authorjsing <jsing@openbsd.org>
Tue, 30 Jan 2024 14:50:50 +0000 (14:50 +0000)
committerjsing <jsing@openbsd.org>
Tue, 30 Jan 2024 14:50:50 +0000 (14:50 +0000)
commit3df8755f76ee673080b958c208c537efddc60aa5
treea00fbe29384e28096e7555aa063e5a6bb2a1f003
parentff1ff8a01d1bf69dcc9f712703fdb95e504b436c
Restore SSL_shutdown() two step sequence.

Change SSL_shutdown() such that it will return 0 after sending a
close-notify, before potentially returning 1 (indicating that a
close-notify has been sent and received) on a subsequent call. Some
software depends on this behaviour, even though there are cases where
the first call could immediately return 1 (for example, when the peer
has already sent a close-notify prior to SSL_shutdown() being called).

ok tb@
lib/libssl/tls13_legacy.c