ca

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 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 CertStore

TODO Add a certificate wrapper type TODO Need to be able to get revocation reason

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