info

package
v0.0.0-...-86ecfbe Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2016 License: BSD-2-Clause Imports: 8 Imported by: 0

Documentation

Overview

Package info implements the HTTP handler for the info command.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHandler

func NewHandler(s signer.Signer) (http.Handler, error)

NewHandler creates a new handler to serve information on the CA's certificates, taking a signer to use.

func NewMultiHandler

func NewMultiHandler(signers map[string]signer.Signer, defaultLabel string) (http.Handler, error)

NewMultiHandler constructs a MultiHandler from a mapping of labels to signers and the default label.

Types

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

Handler is a type that contains the root certificates for the CA, and serves information on them for clients that need the certificates.

func (*Handler) Handle

func (h *Handler) Handle(w http.ResponseWriter, r *http.Request) error

Handle listens for incoming requests for CA information, and returns a list containing information on each root certificate.

type MultiHandler

type MultiHandler struct {
	// contains filtered or unexported fields
}

MultiHandler is a handler for providing the public certificates for a multi-root certificate authority. It takes a mapping of label to signer and a default label, and handles the standard information request as defined in the client package.

func (*MultiHandler) Handle

func (h *MultiHandler) Handle(w http.ResponseWriter, r *http.Request) error

Handle accepts client information requests, and uses the label to look up the signer whose public certificate should be retrieved. If the label is empty, the default label is used.

Jump to

Keyboard shortcuts

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