From 5728ddd4598a3a73f5b5071be5f8998ecb03b6cb Mon Sep 17 00:00:00 2001 From: MarkusTeufelberger Date: Sun, 28 May 2017 19:39:43 +0200 Subject: [PATCH 1/2] Remove SSL_R_SHORT_READ detection OpenSSL removed this functionality upstream --- src/ripple/beast/asio/ssl_error.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ripple/beast/asio/ssl_error.h b/src/ripple/beast/asio/ssl_error.h index a2c14bec192..4af2df43814 100644 --- a/src/ripple/beast/asio/ssl_error.h +++ b/src/ripple/beast/asio/ssl_error.h @@ -68,8 +68,12 @@ inline bool is_short_read(boost::system::error_code const& ec) { +#ifdef SSL_R_SHORT_READ return (ec.category() == boost::asio::error::get_ssl_category()) && (ERR_GET_REASON(ec.value()) == SSL_R_SHORT_READ); +#else + return false; +#endif } } // beast From a4a440b69dba0931e9ad1a2d1f2b2b262b71d5df Mon Sep 17 00:00:00 2001 From: Markus Teufelberger Date: Sun, 4 Jun 2017 21:54:35 +0200 Subject: [PATCH 2/2] Don't try to set deprecated flag for current OpenSSL versions Closes #2047 --- src/ripple/basics/impl/make_SSLContext.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/ripple/basics/impl/make_SSLContext.cpp b/src/ripple/basics/impl/make_SSLContext.cpp index 7a47a69b356..b2ad3972904 100644 --- a/src/ripple/basics/impl/make_SSLContext.cpp +++ b/src/ripple/basics/impl/make_SSLContext.cpp @@ -201,6 +201,7 @@ disallowRenegotiation (SSL const* ssl, bool isNew) return false; } +#if OPENSSL_VERSION_NUMBER < 0x10100000L static void info_handler (SSL const* ssl, int event, int) @@ -211,8 +212,16 @@ info_handler (SSL const* ssl, int event, int) ssl->s3->flags |= SSL3_FLAGS_NO_RENEGOTIATE_CIPHERS; } } - +#else static +void +info_handler (SSL const* ssl, int event, int) +{ +// empty +} +#endif +static + std::string error_message (std::string const& what, boost::system::error_code const& ec)