ca

package
v0.0.1-alpha Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SerialOctets = 20
	SerialBits   = 8 * SerialOctets
)

Variables

View Source
var (
	ErrCertNotFound = errors.New("certificate not found")
	ErrCertExpired  = errors.New("certificate is expired")
)

Functions

This section is empty.

Types

type CertStatus

type CertStatus uint8
const (
	Invalid CertStatus = iota
	Valid
	Revoked
	Expired
)

type ID

type ID interface{ Bytes() []byte }

type KeyID

type KeyID interface {
	Serial() ID
	KeyHash() []byte
}

type KeyPair

type KeyPair struct {
	Key  crypto.Signer
	Cert *x509.Certificate
}

type Responder

type Responder struct {
	Signer KeyPair
	CA     *x509.Certificate
}

type ResponderDB

type ResponderDB interface {
	// Get a responder by key hash.
	Get(context.Context, []byte) (*Responder, error)
	// Insert a new responder
	Put(context.Context, *Responder) error
	// Delete a responder
	Del(context.Context, []byte) error
	// Find the responder keys given a leaf certificate
	Find(context.Context, *x509.Certificate) (*Responder, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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