Documentation ¶
Index ¶
- func AppendKeyPair(tlsConfig *tls.Config, certFile string, keyFile string) error
- func HasString(elem string, arr []string) bool
- func ListenAndServeTLS(addr string, handler nethttp.Handler, tlsConfig *tls.Config) error
- func NewTLSConfig(caFile string, mutualTLS bool) (*tls.Config, error)
- func Verify(r *nethttp.Request, validOUs []string) error
- func VerifyOUs(validOUs []string) martini.Handler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendKeyPair ¶
AppendKeyPair loads the given TLS key pair and appends it to tlsConfig.Certificates.
func ListenAndServeTLS ¶
ListenAndServeTLS acts identically to http.ListenAndServeTLS, except that it expects TLS configuration. TODO: refactor so this is testable?
func NewTLSConfig ¶
NewTLSConfig returns an initialized TLS configuration suitable for client authentication. If caFile is non-empty, it will be loaded.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.