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

tubes/remote: Support Server Name Indication and enable by default #1644

Merged
merged 2 commits into from
Jul 25, 2020

Conversation

Mrmaxmeier
Copy link
Contributor

Motivation: Allow tubes to connect to TLS services that do server name based matching.

This allows customizing the server_name via sni="custom.com" or sending
the name specified in the host parameter via sni=True.


Implementation:

This switches to the SSLContext.wrap_socket API because ssl.wrap_socket is
deprecated and does not support SNI.

Unfortunately, SSLContext.wrap_socket dropped some of the parameters
that are supported by ssl.wrap_socket. These parameters have been moved
to the SSLContext API and can now be used by passing a custom SSLContext
to the ssl_context parameter of remote.


This PR changes the default settings for all tls=True tubes and includes backwards-incompatible changes! Feel free to close/reject.

This allows customizing the server_name via sni="custom" or sending the
name specified in the host parameter via sni=True.

We switch to the SSLContext.wrap_socket API because ssl.wrap_socket is
deprecated and does not support SNI.

Unfortunately, SSLContext.wrap_socket dropped some of the parameters
that are supported by ssl.wrap_socket. These parameters have been moved
to the SSLContext API and can now be used by passing a custom SSLContext
to the ssl_context parameter of `remote`.
@Arusekk Arusekk merged commit b6fc0f3 into Gallopsled:dev Jul 25, 2020
@Mrmaxmeier Mrmaxmeier deleted the remote-default-sni-for-ssl branch July 25, 2020 12:54
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