dialer

package
v0.0.0-...-8b501b0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 6, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TLSDialer

type TLSDialer func(network, addr string) (net.Conn, error)

TLSDialer is a function for creating TLS connections for non-proxied requests that can be assigned to a http.Transport's DialTLS field.

func WithPinnedCertVerification

func WithPinnedCertVerification(pkFingerprint []byte, tlsConfig *tls.Config) TLSDialer

WithPinnedCertVerification returns a TLS dialer function which checks that the remote server provides a certificate whose SHA256 fingerprint matches the provided value.

The returned dialer function can be plugged into a http.Transport's DialTLS field to implement certificate pinning.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL