api

package
v0.15.16-rc7 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2021 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(scepAuth scep.Interface) api.RouterHandler

New returns a new SCEP API router.

Types

type Handler

type Handler struct {
	Auth scep.Interface
}

Handler is the SCEP request handler.

func (*Handler) Get

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

Get handles all SCEP GET requests

func (*Handler) GetCACaps

func (h *Handler) GetCACaps(ctx context.Context) (SCEPResponse, error)

GetCACaps returns the CA capabilities in a SCEP response

func (*Handler) GetCACert

func (h *Handler) GetCACert(ctx context.Context) (SCEPResponse, error)

GetCACert returns the CA certificates in a SCEP response

func (*Handler) PKIOperation

func (h *Handler) PKIOperation(ctx context.Context, request SCEPRequest) (SCEPResponse, error)

PKIOperation performs PKI operations and returns a SCEP response

func (*Handler) Post

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

Post handles all SCEP POST requests

func (*Handler) Route

func (h *Handler) Route(r api.Router)

Route traffic and implement the Router interface.

type SCEPRequest

type SCEPRequest struct {
	Operation string
	Message   []byte
}

SCEPRequest is a SCEP server request.

type SCEPResponse

type SCEPResponse struct {
	Operation   string
	CACertNum   int
	Data        []byte
	Certificate *x509.Certificate
	Error       error
}

SCEPResponse is a SCEP server response.

Jump to

Keyboard shortcuts

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