Skip to content

Commit 78bae21

Browse files
committed
Deleting SSL_set_tlsext_host_name call as this function call is already present in cpprest module
1 parent 920d63e commit 78bae21

File tree

1 file changed

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

1 file changed

+0
-16
lines changed

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

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -229,22 +229,6 @@ class connection : public lib::enable_shared_from_this<connection> {
229229
* @param callback Handler to call back with completion information
230230
*/
231231
void pre_init(init_handler callback) {
232-
// TODO: is this the best way to check whether this function is
233-
// available in the version of OpenSSL being used?
234-
// TODO: consider case where host is an IP address
235-
#if OPENSSL_VERSION_NUMBER >= 0x90812f
236-
if (!m_is_server) {
237-
// For clients on systems with a suitable OpenSSL version, set the
238-
// TLS SNI hostname header so connecting to TLS servers using SNI
239-
// will work.
240-
long res = SSL_set_tlsext_host_name(
241-
get_socket().native_handle(), m_uri->get_host().c_str());
242-
if (!(1 == res)) {
243-
callback(socket::make_error_code(socket::error::tls_failed_sni_hostname));
244-
}
245-
}
246-
#endif
247-
248232
if (m_socket_init_handler) {
249233
m_socket_init_handler(m_hdl,get_socket());
250234
}

0 commit comments

Comments
 (0)