package certadd

import "github.com/cloudflare/cfssl/api/certadd"

Index

Functions

func NewHandler

func NewHandler(dbAccessor certdb.Accessor, signer ocsp.Signer) http.Handler

NewHandler creates a new Handler from a certdb.Accessor and ocsp.Signer

Types

type AddRequest

type AddRequest struct {
	Serial       string         `json:"serial_number"`
	AKI          string         `json:"authority_key_identifier"`
	CALabel      string         `json:"ca_label"`
	Status       string         `json:"status"`
	Reason       int            `json:"reason"`
	Expiry       time.Time      `json:"expiry"`
	RevokedAt    time.Time      `json:"revoked_at"`
	PEM          string         `json:"pem"`
	IssuedAt     *time.Time     `json:"issued_at"`
	NotBefore    *time.Time     `json:"not_before"`
	MetadataJSON types.JSONText `json:"metadata"`
	SansJSON     types.JSONText `json:"sans"`
	CommonName   string         `json:"common_name"`
}

AddRequest describes a request from a client to insert a certificate into the database.

type Handler

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

A Handler accepts new SSL certificates and inserts them into the certdb, creating an appropriate OCSP response for them.

func (*Handler) Handle

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

Handle handles HTTP requests to add certificates

Source Files

insert.go

Version
v1.6.5 (latest)
Published
Mar 5, 2024
Platform
linux/amd64
Imports
16 packages
Last checked
6 days ago

Tools for package owners.