issuance

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package issuance creates identities and bounded CA transition certificates.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Authority

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

func NewAuthority

func NewAuthority(name string, now time.Time, lifetime time.Duration) (*Authority, error)

func ParseAuthority

func ParseAuthority(pair KeyPair) (*Authority, error)

ParseAuthority allows expired CAs so callers can recover their persisted state.

func (*Authority) CheckIdentity

func (a *Authority) CheckIdentity(pair KeyPair, name string, usage x509.ExtKeyUsage) (time.Time, error)

CheckIdentity verifies persisted identity material even after its expiry.

func (*Authority) CheckTransition

func (a *Authority) CheckTransition(pair KeyPair, previousCA []byte, until time.Time) error

func (*Authority) CrossSign

func (a *Authority) CrossSign(next *Authority, now, until time.Time) ([]byte, error)

CrossSign bridges old trust to the next CA only until the supplied deadline.

func (*Authority) ExpiresAt

func (a *Authority) ExpiresAt() time.Time

func (*Authority) Issue

func (a *Authority) Issue(dnsName string, usage x509.ExtKeyUsage, now time.Time, lifetime time.Duration) (KeyPair, error)

func (*Authority) KeyPair

func (a *Authority) KeyPair() (KeyPair, error)

type KeyPair

type KeyPair struct {
	Certificate []byte
	PrivateKey  []byte
}

KeyPair contains PEM data. Neither field belongs in logs or diagnostics.

Jump to

Keyboard shortcuts

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