package connhelpers

import "github.com/mwitkow/go-conntrack/connhelpers"

Index

Functions

func TlsConfigForServerCerts

func TlsConfigForServerCerts(certFile string, keyFile string) (*tls.Config, error)

TlsConfigForServerCerts is a returns a simple `tls.Config` with the given server cert loaded. This is useful if you can't use `http.ListenAndServerTLS` when using a custom `net.Listener`.

func TlsConfigWithHttp2Enabled

func TlsConfigWithHttp2Enabled(config *tls.Config) (*tls.Config, error)

TlsConfigWithHttp2Enabled makes it easy to configure the given `tls.Config` to prefer H2 connections. This is useful if you can't use `http.ListenAndServerTLS` when using a custom `net.Listener`.

Source Files

tls.go

Version
v0.0.0-20190716064945-2f068394615f (latest)
Published
Jul 16, 2019
Platform
darwin/amd64
Imports
2 packages
Last checked
3 weeks ago

Tools for package owners.