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:
		@@ -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);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user