Skip to content

Commit e8048ad

Browse files
authored
BoringSSL does not allow setting the hostname with a null-terminated string. The length is always required: https://boringssl.googlesource.com/boringssl/+/master/crypto/x509/x509_vpm.c#93 (#391)
1 parent 2b40a30 commit e8048ad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ixwebsocket/IXSocketOpenSSL.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -755,7 +755,7 @@ namespace ix
755755
// 1.1.0, but it does not. To be on the safe side, the manual test
756756
// below is enabled for all versions prior to 1.1.0.)
757757
X509_VERIFY_PARAM* param = SSL_get0_param(_ssl_connection);
758-
X509_VERIFY_PARAM_set1_host(param, host.c_str(), 0);
758+
X509_VERIFY_PARAM_set1_host(param, host.c_str(), host.size());
759759
#endif
760760
handshakeSuccessful = openSSLClientHandshake(host, errMsg, isCancellationRequested);
761761
}

0 commit comments

Comments
 (0)