We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 450133d + 0dd20a7 commit bdfaaa5Copy full SHA for bdfaaa5
1 file changed
libwsc/WebSocketClient.cpp
@@ -119,13 +119,16 @@ void WebSocketClient::connect() {
119
120
ssl = SSL_new(ctx);
121
122
+
123
if (!ssl) {
124
SSL_CTX_free(ctx);
125
log_error("SSL_new() failed");
126
sendError(ErrorCode::TLS_INIT_FAILED, "SSL context creation failed");
127
return;
128
}
129
130
+ SSL_set_tlsext_host_name(ssl, host.c_str());
131
132
if (!tlsOptions.disableHostnameValidation) {
133
X509_VERIFY_PARAM* param = SSL_get0_param(ssl);
134
if (param) {
@@ -2089,4 +2092,4 @@ std::string WebSocketClient::computeAccept(const std::string &key) {
2089
2092
auto rawDigest = hexToBytes(hexDigest);
2090
2093
return base64_encode(rawDigest.data(), rawDigest.size());
2091
2094
#endif
-}
2095
+}
0 commit comments