diff --git a/Builds/CMake/CMakeFuncs.cmake b/Builds/CMake/CMakeFuncs.cmake index 09373954c..9a4ffdfa7 100644 --- a/Builds/CMake/CMakeFuncs.cmake +++ b/Builds/CMake/CMakeFuncs.cmake @@ -388,6 +388,11 @@ macro(use_openssl openssl_min) endif() find_package(OpenSSL) + # depending on how openssl is built, it might depend + # on zlib. In fact, the openssl find package should + # figure this out for us, but it does not currently... + # so let's add zlib ourselves to the lib list + find_package(ZLIB) if (static) set(CMAKE_FIND_LIBRARY_SUFFIXES tmp) @@ -395,6 +400,7 @@ macro(use_openssl openssl_min) if (OPENSSL_FOUND) include_directories(${OPENSSL_INCLUDE_DIR}) + list(APPEND OPENSSL_LIBRARIES ${ZLIB_LIBRARIES}) else() message(FATAL_ERROR "OpenSSL not found") endif() diff --git a/src/test/beast/beast_asio_error_test.cpp b/src/test/beast/beast_asio_error_test.cpp index 8ef99a097..49160ffa6 100644 --- a/src/test/beast/beast_asio_error_test.cpp +++ b/src/test/beast/beast_asio_error_test.cpp @@ -33,7 +33,12 @@ public: boost::system::error_code (335544539, boost::asio::error::get_ssl_category ()); std::string const s = beast::error_message_with_ssl(ec); + +#ifdef SSL_R_SHORT_READ BEAST_EXPECT(s == " (20,0,219) error:140000DB:SSL routines:SSL routines:short read"); +#else + BEAST_EXPECT(s == " (20,0,219) error:140000DB:SSL routines:SSL routines:reason(219)"); +#endif } } };