Documentation ¶
Index ¶
- func ConfigureClientTLS(opts *ClientTLSOpts) (*tls.Config, error)
- func ConfigureServerTLS(opts *ServerTLSOpts) (*tls.Config, error)
- func NotFoundHandler(ctx context.Context, w http.ResponseWriter, r *http.Request) error
- func RootHandlerFactory(auth auth.AccessController, ctx context.Context, trust signed.CryptoService) func(contextHandler, ...string) *rootHandler
- type ClientTLSOpts
- type ServerTLSOpts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigureClientTLS ¶
func ConfigureClientTLS(opts *ClientTLSOpts) (*tls.Config, error)
ConfigureClientTLS generates a tls configuration for clients using the provided parameters. / Note that if the root CA file contains invalid data, behavior is not guaranteed. Currently (as of Go 1.5.1) only the valid certificates up to the bad data will be parsed and added the root CA pool.
func ConfigureServerTLS ¶
func ConfigureServerTLS(opts *ServerTLSOpts) (*tls.Config, error)
ConfigureServerTLS specifies a set of ciphersuites, the server cert and key, and optionally client authentication. Note that a tls configuration is constructed that either requires and verifies client authentication or doesn't deal with client certs at all. Nothing in the middle.
Also note that if the client CA file contains invalid data, behavior is not guaranteed. Currently (as of Go 1.5.1) only the valid certificates up to the bad data will be parsed and added the client CA pool.
func NotFoundHandler ¶
NotFoundHandler is used as a generic catch all handler to return the ErrMetadataNotFound 404 response
func RootHandlerFactory ¶
func RootHandlerFactory(auth auth.AccessController, ctx context.Context, trust signed.CryptoService) func(contextHandler, ...string) *rootHandler
RootHandlerFactory creates a new rootHandler factory using the given Context creator and authorizer. The returned factory allows creating new rootHandlers from the alternate http handler contextHandler and a scope.