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

WIP: Allow the customization of the TLS connection #592

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rgl
Copy link

@rgl rgl commented Aug 17, 2020

This should fix #308 and #444.

I'm using this at https://github.com/rgl/dump-sql-server-certificate-chain/tree/configure-tls

Can you please review? I've got several TODOs in there that I'm not sure how to implement this.

Copy link
Owner

@denisenkom denisenkom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like you only need to override TLS Config. How about adding TLSConfig property instead of adding NewTLSConn property. It can then be passed to tls.Client call.

tlsConn := tls.Client(&passthrough, &config)
var tlsConn *tls.Conn
if c.NewTLSConn != nil {
// TODO modify NewTLSConn to also return an err? and bail if err?
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is better to have NewTLSConn to have same interface as tls.Client, so current implementation should be ok

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.

how to hook into the TLS handshake
2 participants