| Index: runtime/bin/secure_socket.cc
|
| diff --git a/runtime/bin/secure_socket.cc b/runtime/bin/secure_socket.cc
|
| index 12805872fbf3d75f96b8f37b8a1f0c5369cbf429..c32301d6b7adc557c25469a3efac0d7b6a810d7b 100644
|
| --- a/runtime/bin/secure_socket.cc
|
| +++ b/runtime/bin/secure_socket.cc
|
| @@ -880,11 +880,12 @@ void SSLFilter::Connect(const char* hostname,
|
| SetAlpnProtocolList(protocols_handle, ssl_, NULL, false);
|
| // Sets the hostname in the certificate-checking object, so it is checked
|
| // against the certificate presented by the server.
|
| - X509_VERIFY_PARAM* certificate_checking_parameters_ = SSL_get0_param(ssl_);
|
| + X509_VERIFY_PARAM* certificate_checking_parameters = SSL_get0_param(ssl_);
|
| hostname_ = strdup(hostname);
|
| - X509_VERIFY_PARAM_set_hostflags(certificate_checking_parameters_, 0);
|
| - X509_VERIFY_PARAM_set1_host(certificate_checking_parameters_,
|
| - hostname_, 0);
|
| + X509_VERIFY_PARAM_set_hostflags(certificate_checking_parameters, 0);
|
| + X509_VERIFY_PARAM_set1_host(certificate_checking_parameters,
|
| + hostname_, strlen(hostname_));
|
| + // TODO(24225) Check return value of set1_host().
|
| // TODO(24186) free hostname_ if it is not freed when SSL is destroyed.
|
| // otherwise, make it a local variable, not a instance field.
|
| }
|
|
|