]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw/beast: enablment of SSL session-id reuse speedup mechanism 56120/head
authorMark Kogan <mkogan@redhat.com>
Tue, 5 Mar 2024 14:48:56 +0000 (16:48 +0200)
committerMark Kogan <mkogan@redhat.com>
Mon, 11 Mar 2024 11:17:06 +0000 (13:17 +0200)
Enable the OpenSSL session-id reuse acceleration mechanism that is described in:

https://www.openssl.org/docs/man1.0.2/man3/SSL_CTX_set_session_id_context.html
SSL_CTX_set_session_id_context, SSL_set_session_id_context - set context
within which session can be reused (server side only)

Fixes: https://tracker.ceph.com/issues/64719
Signed-off-by: Mark Kogan <mkogan@redhat.com>
(cherry picked from commit 6fb4c5d0c0694c9cfdbf0ed729d9f95886a0673f)

src/rgw/rgw_asio_frontend.cc

index 633a2963300f60b2e10c809a185daa2bc6f00a85..d84264a0a4d056dac1c2f36143ca451f2efb5e4e 100644 (file)
@@ -1036,10 +1036,10 @@ void AsioFrontend::accept(Listener& l, boost::system::error_code ec)
         handle_connection(context, env, stream, timeout, header_limit,
                           conn->buffer, true, pause_mutex, scheduler.get(),
                           uri_prefix, ec, yield);
-        if (!ec) {
-          // ssl shutdown (ignoring errors)
-          stream.async_shutdown(yield[ec]);
-        }
+
+        // ssl shutdown (ignoring errors)
+        stream.async_shutdown(yield[ec]);
+        
         conn->socket.shutdown(tcp::socket::shutdown_both, ec);
       }, make_stack_allocator());
   } else {