diff --git a/server_https.hpp b/server_https.hpp index 4150eb2..7360c89 100644 --- a/server_https.hpp +++ b/server_https.hpp @@ -47,10 +47,9 @@ namespace SimpleWeb { // Creating session_id_context from address:port but reversed due to small SSL_MAX_SSL_SESSION_ID_LENGTH auto session_id_context = std::to_string(acceptor->local_endpoint().port()) + ':'; session_id_context.append(config.address.rbegin(), config.address.rend()); - const auto session_id_length = static_cast(std::min(session_id_context.size(), SSL_MAX_SSL_SESSION_ID_LENGTH)); SSL_CTX_set_session_id_context(context.native_handle(), reinterpret_cast(session_id_context.data()), - session_id_length); + static_cast(std::min(session_id_context.size(), SSL_MAX_SSL_SESSION_ID_LENGTH))); } }