cert

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2025 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDb

func NewDb(url string) *sql.DB

Types

type DbCertificate

type DbCertificate struct {
	Raw     x509.Certificate
	CN      string
	Serial  string
	SerialH string // human friendly representation
	Revoked bool
	// store converted timestamps already as these fields are only used for display in HTML
	NotBefore string
	NotAfter  string
}

type DbCertificateCache

type DbCertificateCache struct {
	Certificates DbCertificates
	// contains filtered or unexported fields
}

type DbCertificates

type DbCertificates []*DbCertificate

func (*DbCertificates) Filter

func (d *DbCertificates) Filter(cn string, serial string, limit int) DbCertificates

type Step

type Step struct {
	Certificates atomic.Pointer[DbCertificateCache]
	// contains filtered or unexported fields
}

func NewStep

func NewStep(caurl string, cacert string, hash string, dburl string, adminprov string, adminpass string) *Step

func (*Step) GetCertificates

func (s *Step) GetCertificates() DbCertificates

func (*Step) MakeCertAndKey

func (s *Step) MakeCertAndKey(token string) ([]byte, []byte)

func (*Step) RefreshCertificates

func (s *Step) RefreshCertificates()

func (*Step) RevokeCert

func (s *Step) RevokeCert(serial string, ott string) bool

func (*Step) Token

func (s *Step) Token(subject string) string

Jump to

Keyboard shortcuts

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