Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadClientCertificate ¶
func LoadClientCertificate(certFile, keyFile string) (*tls.Certificate, error)
LoadClientCertificate loads a client certificate and private key for mutual TLS authentication
func NewHTTP ¶
func NewHTTP(pool *x509.CertPool, clientCert *tls.Certificate, minTLS uint16, timeout time.Duration) (*http.Client, context.Context)
NewHTTP creates an HTTP client with the given certificate pool, client cert, and TLS settings The timeout parameter is ignored - timeouts should be controlled per-request via context
Types ¶
type Options ¶
type Options struct {
CACertFile string // Path to PEM bundle file
CACertDir string // Directory containing *.pem or *.crt files
ClientCertFile string // Path to client certificate file
ClientKeyFile string // Path to client certificate private key file
Timeout time.Duration // HTTP client timeout
MinTLS uint16 // Minimum TLS version
}
Options configures certificate loading and HTTP client behavior
Click to show internal directories.
Click to hide internal directories.