Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenSSL 1.1 compatibility patches #2126

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion src/ripple/basics/impl/make_SSLContext.cpp
Original file line number Diff line number Diff line change
@@ -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)
4 changes: 4 additions & 0 deletions src/ripple/beast/asio/ssl_error.h
Original file line number Diff line number Diff line change
@@ -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