Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes #1602: NetClient with SOCKS Proxy checks wrong hostname on upgradeToSsl() #1604

Merged
merged 1 commit into from
Sep 6, 2016

Conversation

alexlehm
Copy link
Contributor

@alexlehm alexlehm commented Sep 3, 2016

this is a rather unlikely usecase when connecting with a SOCKS proxy to a service that requires upgradeToSsl
e.g. STARTTLS in SMTP, since the ssl helper is constructed with the target address of the tcp connection, the cert is checked against the proxy address (e.g. localhost) instead of the actual address (e.g. smtp.gmail.com)

…tname on upgradeToSsl()

pass the host to from NetClient connect to NetSocket and
use actual address of host when using upgradeToSsl to check ssl cert
add unit test for ssl connect and ssl upgrade with SOCKS proxy to NetTest
remove a few NetServer close/reopen in a few tests where it was not needed

Signed-off-by: alexlehm <alexlehm@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants