Skip to content

Commit a08366f

Browse files
sourcecdSergey J
and
Sergey J
authored
add strip port for ssl outgoing connection (#1665)
Co-authored-by: Sergey J <[email protected]>
1 parent 903def9 commit a08366f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ydb/library/actors/http/http_proxy_sock_impl.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,9 @@ struct TSecureSocketImpl : TPlainSocketImpl, TSslHelpers {
177177
Ctx = CreateClientContext();
178178
Ssl = ConstructSsl(Ctx.Get(), Bio.Get());
179179
if (!Host.Empty()) {
180-
SSL_set_tlsext_host_name(Ssl.Get(), Host.c_str());
180+
TVector<TString> items;
181+
Split(Host, ":", items);
182+
SSL_set_tlsext_host_name(Ssl.Get(), items[0].c_str());
181183
}
182184
SSL_set_connect_state(Ssl.Get());
183185
}
@@ -204,6 +206,7 @@ struct TSecureSocketImpl : TPlainSocketImpl, TSslHelpers {
204206
write = true;
205207
return -EAGAIN;
206208
default:
209+
std::cerr << "(SSL_ERROR): " << ERR_error_string(ERR_get_error(), NULL) << std::endl;
207210
return -EIO;
208211
}
209212
}

0 commit comments

Comments
 (0)