Allow OpenSSL 1.1 (#950)

Tested with OpenSSL 1.1.0f (Debian Stretch) and OpenSSL 1.0.2g (Ubuntu 16.04 LTS)
This commit is contained in:
SergiySW 2018-08-10 06:05:37 +03:00 committed by Roy Keene
commit bcc55f99bc
2 changed files with 5 additions and 5 deletions

View file

@ -100,7 +100,7 @@ endif ()
SET( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${PLATFORM_LINK_FLAGS}" )
if (RAIBLOCKS_SECURE_RPC)
find_package (OpenSSL 1.0 EXACT REQUIRED)
find_package (OpenSSL 1.0 REQUIRED)
#include_directories(${OPENSSL_INCLUDE_DIR})
add_definitions (-DRAIBLOCKS_SECURE_RPC)
message("OpenSSL include dir: ${OPENSSL_INCLUDE_DIR}")

View file

@ -4,8 +4,8 @@
bool rai::rpc_secure::on_verify_certificate (bool preverified, boost::asio::ssl::verify_context & ctx)
{
X509_STORE_CTX * cts = ctx.native_handle ();
switch (cts->error)
auto error (X509_STORE_CTX_get_error (cts));
switch (error)
{
case X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT:
BOOST_LOG (node.log) << "TLS: Unable to get issuer";
@ -36,9 +36,9 @@ bool rai::rpc_secure::on_verify_certificate (bool preverified, boost::asio::ssl:
if (config.secure.verbose_logging)
{
if (cts->error != 0)
if (error != 0)
{
BOOST_LOG (node.log) << "TLS: Error: " << cts->error;
BOOST_LOG (node.log) << "TLS: Error: " << X509_verify_cert_error_string (error);
BOOST_LOG (node.log) << "TLS: Error chain depth : " << X509_STORE_CTX_get_error_depth (cts);
}