From ea127f04e7d04ac049eb837d35588ec199b11226 Mon Sep 17 00:00:00 2001 From: Kevin Ushey Date: Tue, 2 Jan 2018 08:59:54 -0800 Subject: [PATCH] compile with newer OpenSSL variants --- src/cpp/core/http/SocketProxy.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/cpp/core/http/SocketProxy.cpp b/src/cpp/core/http/SocketProxy.cpp index 6d352b6e3b..49c133c5cb 100644 --- a/src/cpp/core/http/SocketProxy.cpp +++ b/src/cpp/core/http/SocketProxy.cpp @@ -148,8 +148,14 @@ namespace { #ifndef _WIN32 bool isSslShutdownError(const core::Error& error) { +#ifdef SSL_R_SHORT_READ + // OpenSSL 1.0.0 return error.code().category() == boost::asio::error::get_ssl_category() && error.code().value() == ERR_PACK(ERR_LIB_SSL, 0, SSL_R_SHORT_READ); +#else + // OpenSSL 1.1.0 + return error.code() == boost::asio::ssl::error::stream_truncated; +#endif } #else bool isSslShutdownError(const core::Error& error)