Skip to content

Commit

Permalink
add strip port for ssl outgoing connection (#1665)
Browse files Browse the repository at this point in the history
Co-authored-by: Sergey J <wint@yandex-team.ru>
  • Loading branch information
sourcecd and Sergey J authored Feb 7, 2024
1 parent 903def9 commit a08366f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ydb/library/actors/http/http_proxy_sock_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,9 @@ struct TSecureSocketImpl : TPlainSocketImpl, TSslHelpers {
Ctx = CreateClientContext();
Ssl = ConstructSsl(Ctx.Get(), Bio.Get());
if (!Host.Empty()) {
SSL_set_tlsext_host_name(Ssl.Get(), Host.c_str());
TVector<TString> items;
Split(Host, ":", items);
SSL_set_tlsext_host_name(Ssl.Get(), items[0].c_str());
}
SSL_set_connect_state(Ssl.Get());
}
Expand All @@ -204,6 +206,7 @@ struct TSecureSocketImpl : TPlainSocketImpl, TSslHelpers {
write = true;
return -EAGAIN;
default:
std::cerr << "(SSL_ERROR): " << ERR_error_string(ERR_get_error(), NULL) << std::endl;
return -EIO;
}
}
Expand Down

0 comments on commit a08366f

Please sign in to comment.