ssl

package
v1.4.550 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2015 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendKeyPair

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

AppendKeyPair loads the given TLS key pair and appends it to tlsConfig.Certificates.

func HasString

func HasString(elem string, arr []string) bool

Determine if a string element is in a string array

func ListenAndServeTLS

func ListenAndServeTLS(addr string, handler nethttp.Handler, tlsConfig *tls.Config) error

ListenAndServeTLS acts identically to http.ListenAndServeTLS, except that it expects TLS configuration. TODO: refactor so this is testable?

func NewTLSConfig

func NewTLSConfig(caFile string, mutualTLS bool) (*tls.Config, error)

NewTLSConfig returns an initialized TLS configuration suitable for client authentication. If caFile is non-empty, it will be loaded.

func Verify

func Verify(r *nethttp.Request, validOUs []string) error

Verify that the OU of the presented client certificate matches the list of Valid OUs

func VerifyOUs

func VerifyOUs(validOUs []string) martini.Handler

TODO: make this testable?

Types

This section is empty.

Jump to

Keyboard shortcuts

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