websocketpp icon indicating copy to clipboard operation
websocketpp copied to clipboard

‘SSL_R_SHORT_READ’ was not declared

Open ivan-zapreev opened this issue 7 years ago • 2 comments

OpeSSL1.1.0 backwards compatibility issue.

websocketpp0.7.0/transport/asio/security/tls.hpp: In member function ‘std::error_code websocketpp::transport::asio::tls_socket::connection::translate_ec(ErrorCodeType)’:
websocketpp0.7.0/transport/asio/security/tls.hpp:358:47: error: ‘SSL_R_SHORT_READ’ was not declared in this scope
             if (ERR_GET_REASON(ec.value()) == SSL_R_SHORT_READ) {
                                               ^~~~~~~~~~~~~~~~
websocketpp0.7.0/transport/asio/security/tls.hpp:358:47: note: suggested alternative: ‘SSL_F_SSL_READ’
             if (ERR_GET_REASON(ec.value()) == SSL_R_SHORT_READ) {
                                               ^~~~~~~~~~~~~~~~
                                               SSL_F_SSL_READ

ivan-zapreev avatar Jun 04 '18 17:06 ivan-zapreev

The error also appears with the latest (1-12-0) release of ASIO from https://github.com/chriskohlhoff/asio/releases

ivan-zapreev avatar Jun 05 '18 09:06 ivan-zapreev

i encountered the same problem on centos 7 when building websocketpp 0.8.2 . but i just installed openssl 1.1.0l version which was not the default version on that OS. I removed this openssl and installed the default version (using yum install openssl,1.0.2k), and everything went well then.

Apparently, it seems that websocketpp 0.8.2 is not compatible with newer version of openssl( later than 1.0.2k). Using the proper version of openssl for building websocketpp is quite crucial.

ChrisZhangJin avatar Apr 11 '23 09:04 ChrisZhangJin