Commit b4de9e83 authored by Yossi Gottlieb's avatar Yossi Gottlieb Committed by Oran Agra
Browse files

TLS: Notify clients on connection shutdown. (#10931)

Use SSL_shutdown(), in a best-effort manner, when closing a TLS
connection. This change better supports OpenSSL 3.x clients that will
not silently ignore the socket-level EOF.

(cherry picked from commit 45ae6053)
parent 70aaf500
...@@ -715,6 +715,8 @@ static void connTLSClose(connection *conn_) { ...@@ -715,6 +715,8 @@ static void connTLSClose(connection *conn_) {
tls_connection *conn = (tls_connection *) conn_; tls_connection *conn = (tls_connection *) conn_;
if (conn->ssl) { if (conn->ssl) {
if (conn->c.state == CONN_STATE_CONNECTED)
SSL_shutdown(conn->ssl);
SSL_free(conn->ssl); SSL_free(conn->ssl);
conn->ssl = NULL; conn->ssl = NULL;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment