pkg

package
v1.15.1 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2024 License: GPL-3.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoCertFound     = errors.New("no existing cert found")
	ErrRunHook         = errors.New("error running hook")
	ErrCertInvalidData = errors.New("could not parse cert data")
	ErrWriteCert       = errors.New("could not write certificate data")
	ErrIssueCert       = errors.New("error while issuing cert")
	ErrRevokeCert      = errors.New("error while revoking cert")
	ErrSignCert        = errors.New("error while signing cert")
	ErrTidyCert        = errors.New("error while tidying up cert storage")
)

Functions

func FormatSerial

func FormatSerial(i *big.Int) string

func GetFormattedSerial

func GetFormattedSerial(content []byte) (string, error)

func IsCertExpired added in v1.14.0

func IsCertExpired(cert x509.Certificate) bool

func ParseCertPem

func ParseCertPem(data []byte) (*x509.Certificate, error)

Types

type CertData added in v1.15.0

type CertData struct {
	PrivateKey  []byte
	Certificate []byte
	CaData      []byte
	Csr         []byte
}

func (*CertData) AsContainer added in v1.15.0

func (certData *CertData) AsContainer() string

func (*CertData) HasCaData added in v1.15.0

func (cert *CertData) HasCaData() bool

func (*CertData) HasCertificate added in v1.15.0

func (cert *CertData) HasCertificate() bool

func (*CertData) HasPrivateKey added in v1.15.0

func (cert *CertData) HasPrivateKey() bool

type IssueArgs added in v1.15.0

type IssueArgs struct {
	CommonName string
	Ttl        string
	IpSans     []string
	AltNames   []string
}

type IssueResult added in v1.15.0

type IssueResult struct {
	ExistingCert *x509.Certificate
	IssuedCert   *x509.Certificate
	Status       IssueStatus
}

type IssueStatus added in v1.15.0

type IssueStatus int
const (
	Issued  IssueStatus = iota
	Noop    IssueStatus = iota
	Unknown IssueStatus = iota
)

type Signature added in v1.15.0

type Signature struct {
	Certificate []byte
	CaData      []byte
	Serial      string
}

func (*Signature) HasCaData added in v1.15.0

func (cert *Signature) HasCaData() bool

type SignatureArgs added in v1.15.0

type SignatureArgs struct {
	CommonName string
	Ttl        string
	IpSans     []string
	AltNames   []string
}

Directories

Path Synopsis
storage

Jump to

Keyboard shortcuts

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