Change ssl stream implementations
Boost beast ssl_stream is just a wrapper around asio ssl_stream, and
aims to optimize the case where we're writing small payloads (one or two
bytes.) which needs to be optimized in SSL.
bmcweb never writes one or two bytes, we almost always write the full
payload of what we received, so there's no reason to take the binary
size overhead, and additional boost headers that this implementation
requires.
Tested:
This drops the on-target binary size by 2.6%
Redfish service validator passes.
Change-Id: Ie1ae6f197f8e5ed70cf4abc6be9b1b382c42d64d
Signed-off-by: Ed Tanous <ed@tanous.net>
diff --git a/http/http2_connection.hpp b/http/http2_connection.hpp
index 3e0c394..7e8224e 100644
--- a/http/http2_connection.hpp
+++ b/http/http2_connection.hpp
@@ -22,7 +22,6 @@
#include <boost/beast/http/read.hpp>
#include <boost/beast/http/serializer.hpp>
#include <boost/beast/http/write.hpp>
-#include <boost/beast/ssl/ssl_stream.hpp>
#include <boost/beast/websocket.hpp>
#include <boost/system/error_code.hpp>
@@ -545,7 +544,7 @@
void close()
{
if constexpr (std::is_same_v<Adaptor,
- boost::beast::ssl_stream<
+ boost::asio::ssl::stream<
boost::asio::ip::tcp::socket>>)
{
adaptor.next_layer().close();