api

package
v0.0.0-...-748217a Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package api implements a SCEP HTTP server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

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

Get handles all SCEP GET requests

func New deprecated

func New(auth *scep.Authority) api.RouterHandler

New returns a new SCEP API router.

Deprecated: use scep.Route(r api.Router)

func Post

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

Post handles all SCEP POST requests

func Route

func Route(r api.Router)

Route traffic and implement the Router interface.

Types

type Response

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

Response is a SCEP server Response.

func GetCACaps

func GetCACaps(ctx context.Context) (Response, error)

GetCACaps returns the CA capabilities in a SCEP response

func GetCACert

func GetCACert(ctx context.Context) (Response, error)

GetCACert returns the CA certificates in a SCEP response

func PKIOperation

func PKIOperation(ctx context.Context, req request) (Response, error)

PKIOperation performs PKI operations and returns a SCEP response

Jump to

Keyboard shortcuts

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