22 lines
1.1 KiB
Diff
22 lines
1.1 KiB
Diff
diff -up websocketpp-0.7.0/websocketpp/transport/asio/security/tls.hpp.openssl11 websocketpp-0.7.0/websocketpp/transport/asio/security/tls.hpp
|
|
--- websocketpp-0.7.0/websocketpp/transport/asio/security/tls.hpp.openssl11 2016-02-22 07:30:10.000000000 -0600
|
|
+++ websocketpp-0.7.0/websocketpp/transport/asio/security/tls.hpp 2017-05-22 09:49:43.613622484 -0500
|
|
@@ -355,13 +355,17 @@ protected:
|
|
template <typename ErrorCodeType>
|
|
lib::error_code translate_ec(ErrorCodeType ec) {
|
|
if (ec.category() == lib::asio::error::get_ssl_category()) {
|
|
+#ifdef SSL_R_SHORT_READ
|
|
if (ERR_GET_REASON(ec.value()) == SSL_R_SHORT_READ) {
|
|
return make_error_code(transport::error::tls_short_read);
|
|
} else {
|
|
+#endif
|
|
// We know it is a TLS related error, but otherwise don't know
|
|
// more. Pass through as TLS generic.
|
|
return make_error_code(transport::error::tls_error);
|
|
+#ifdef SSL_R_SHORT_READ
|
|
}
|
|
+#endif
|
|
} else {
|
|
// We don't know any more information about this error so pass
|
|
// through
|