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

Dialer: add optional method NetDialTLSContext #746

Merged
merged 1 commit into from Jan 4, 2022

Commits on Jan 3, 2022

  1. Dialer: add optional method NetDialTLSContext

    Fixes issue: gorilla#745
    
    With the previous interface, NetDial and NetDialContext were used for
    both TLS and non-TLS TCP connections, and afterwards TLSClientConfig was
    used to do the TLS handshake.
    
    While this API works for most cases, it prevents from using more advance
    authentication methods during the TLS handshake, as this is out of the
    control of the user.
    
    This commits introduces another a new dial method, NetDialTLSContext,
    which is used when dialing for TLS/TCP. The code then assumes that the
    handshake is done there and TLSClientConfig is not used.
    
    This API change is fully backwards compatible and it better aligns with
    net/http.Transport API, which has these two dial flavors. See:
    https://pkg.go.dev/net/http#Transport
    
    Signed-off-by: Lluis Campos <lluis.campos@northern.tech>
    lluiscampos committed Jan 3, 2022
    Configuration menu
    Copy the full SHA
    18650c5 View commit details
    Browse the repository at this point in the history