Skip to content

Commit f20f378

Browse files
authored
Merge pull request #526 from edukaj/master
FIX Build error on Ubuntu Xenial when using OpenSSH 1.1.0b
2 parents 500f7a2 + 0642275 commit f20f378

File tree

1 file changed

+5
-0
lines changed
  • Release/libs/websocketpp/websocketpp/transport/asio/security

1 file changed

+5
-0
lines changed

Release/libs/websocketpp/websocketpp/transport/asio/security/tls.hpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,8 +307,13 @@ class connection : public lib::enable_shared_from_this<connection> {
307307
*/
308308
lib::error_code translate_ec(boost::system::error_code ec) {
309309
if (ec.category() == boost::asio::error::get_ssl_category()) {
310+
#if defined SSL_R_SHORT_READ
310311
if (ERR_GET_REASON(ec.value()) == SSL_R_SHORT_READ) {
311312
return make_error_code(transport::error::tls_short_read);
313+
#else
314+
if (ERR_GET_REASON(ec.value()) == boost::asio::ssl::error::stream_truncated) {
315+
return make_error_code(boost::asio::ssl::error::stream_truncated);
316+
#endif
312317
} else {
313318
// We know it is a TLS related error, but otherwise don't know
314319
// more. Pass through as TLS generic.

0 commit comments

Comments
 (0)