aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/server/bnetserver/Server/SslContext.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/server/bnetserver/Server/SslContext.cpp b/src/server/bnetserver/Server/SslContext.cpp
index 69d36f92a51..92d95f24cc5 100644
--- a/src/server/bnetserver/Server/SslContext.cpp
+++ b/src/server/bnetserver/Server/SslContext.cpp
@@ -49,8 +49,10 @@ auto OpenOpenSSLStore(boost::filesystem::path const& storePath, UI_METHOD const*
boost::system::error_code GetLastOpenSSLError()
{
auto ossl_error = ::ERR_get_error();
+#if OPENSSL_VERSION_NUMBER >= 0x30000000L
if (ERR_SYSTEM_ERROR(ossl_error))
return boost::system::error_code(static_cast<int>(::ERR_GET_REASON(ossl_error)), boost::asio::error::get_system_category());
+#endif
return boost::system::error_code(static_cast<int>(ossl_error), boost::asio::error::get_ssl_category());
}