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)

This commit is contained in:
Max Weisel 2022-05-05 11:11:18 -04:00 committed by GitHub
parent 2b40a30c8f
commit e8048ad826
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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