You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using the development branch to write a REST server, because I need SSL. I am running under RHEL 7.1. Writing tests using the BOOST test framework, I am able to create a client that successfully connects to google and others using SSL. When trying to connect to my REST server, I get a SIGSEGV (see attached). Note that I can sucessfully execute SSL requests to the server using SOAPUI. I am using BOOST 1.58. The problem seems to be with some Boost inline code in error_code.hpp, which is invoked in http_client_asio.cpp/report_error(). Basically, to get the error handled without a SIGSEGV, I had to change: ec == boost::system::errc::operation_canceled
to ec.value() == boost::system::errc::operation_canceled
I changed all similar comparisons in report_error(). Now I get a nice std::exception and an "Error in SSL handshake" explanation string. Next is finding out why I can't connect, but that's an issue for another day...
Note: This happened when connecting to a server using test certificate and key. I was also missing client_config.set_validate_certificates(false);
Once I added the line above, the error (the SIGSEGV) doesn't occur, probably because there is no error checking... So when it works, it works. It only fails when it fails ;)
I am using the development branch to write a REST server, because I need SSL. I am running under RHEL 7.1. Writing tests using the BOOST test framework, I am able to create a client that successfully connects to google and others using SSL. When trying to connect to my REST server, I get a SIGSEGV (see attached). Note that I can sucessfully execute SSL requests to the server using SOAPUI. I am using BOOST 1.58. The problem seems to be with some Boost inline code in error_code.hpp, which is invoked in http_client_asio.cpp/report_error(). Basically, to get the error handled without a SIGSEGV, I had to change:
ec == boost::system::errc::operation_canceled
to
ec.value() == boost::system::errc::operation_canceled
I changed all similar comparisons in report_error(). Now I get a nice std::exception and an "Error in SSL handshake" explanation string. Next is finding out why I can't connect, but that's an issue for another day...
Note: This happened when connecting to a server using test certificate and key. I was also missing
client_config.set_validate_certificates(false);
Once I added the line above, the error (the SIGSEGV) doesn't occur, probably because there is no error checking... So when it works, it works. It only fails when it fails ;)
CPPRESTSDK SIGSEGV.txt
The text was updated successfully, but these errors were encountered: