mirror of
https://github.com/Xahau/xahaud.git
synced 2025-11-20 10:35:50 +00:00
Remove test sensitivity to error text from OpenSSL
This commit is contained in:
committed by
Nik Bougalis
parent
5741a8356f
commit
ab6163e989
@@ -32,13 +32,14 @@ public:
|
|||||||
boost::system::error_code ec =
|
boost::system::error_code ec =
|
||||||
boost::system::error_code (335544539,
|
boost::system::error_code (335544539,
|
||||||
boost::asio::error::get_ssl_category ());
|
boost::asio::error::get_ssl_category ());
|
||||||
std::string const s = beast::error_message_with_ssl(ec);
|
std::string s = beast::error_message_with_ssl(ec);
|
||||||
|
// strip away last part of the error message since
|
||||||
#ifdef SSL_R_SHORT_READ
|
// it can vary with openssl versions and/or compile
|
||||||
BEAST_EXPECT(s == " (20,0,219) error:140000DB:SSL routines:SSL routines:short read");
|
// flags
|
||||||
#else
|
auto const lastColon = s.find_last_of(':');
|
||||||
BEAST_EXPECT(s == " (20,0,219) error:140000DB:SSL routines:SSL routines:reason(219)");
|
if (lastColon != s.npos)
|
||||||
#endif
|
s = s.substr(0, lastColon);
|
||||||
|
BEAST_EXPECT(s == " (20,0,219) error:140000DB:SSL routines:SSL routines");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user