cert

package
v1.14.1 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckCurrentCertificates added in v1.11.1

func CheckCurrentCertificates(options cli.Options) ([]string, bool, *x509.Certificate)

CheckCurrentCertificates reads all current ceritifactes and verifies whether they are equal. Returns a slice of all enabled cert specifiers, whether they are equal and the current certificate

func HasCertificateDataChanged

func HasCertificateDataChanged(cert *x509.Certificate, options cli.Options) bool

HasCertificateDataChanged verifies whether the requested data matches the data from an already existing certificate on the specified location. This ensures that no certificate is overwritten by mistake

func IsCertificateRenewalDue

func IsCertificateRenewalDue(cert *x509.Certificate, options cli.Options) bool

IsCertificateRenewalDue checks a certificates expiry based on selected options

func RequestCertificate

func RequestCertificate(client *api.Client, options cli.Options) *certutil.ParsedCertBundle

RequestCertificate returns the parsed certificate request response from vault

func WriteCertificates added in v1.11.1

func WriteCertificates(parsedCertBundle *certutil.ParsedCertBundle, options cli.Options)

WriteCertificates writes all certificates that should be updated

Types

type JKS

type JKS struct{}

func (*JKS) ReadCertificate

func (j *JKS) ReadCertificate(options cli.Options) *x509.Certificate

ReadCertificate parses an existing certificate at the specified JKS with the specified label

func (*JKS) WriteCertificate

func (j *JKS) WriteCertificate(parsedCertBundle *certutil.ParsedCertBundle, options cli.Options)

WriteCertificate persists a certificate bundle to the JAVA KeyStore

type PEMFile

type PEMFile struct{}

func (*PEMFile) ReadCertificate

func (p *PEMFile) ReadCertificate(options cli.Options) *x509.Certificate

ReadCertificate parses an existing certificate at the specified location

func (*PEMFile) WriteCertificate

func (p *PEMFile) WriteCertificate(
	parsedCertBundle *certutil.ParsedCertBundle,
	options cli.Options,
)

WriteCertificate persists a certificate bundle to the filesystem in PEM format

type PKCS12

type PKCS12 struct{}

func (*PKCS12) ReadCertificate

func (p *PKCS12) ReadCertificate(options cli.Options) *x509.Certificate

ReadCertificate parses an existing certificate at the specified PKCS#12 KeyStore

func (*PKCS12) WriteCertificate

func (p *PKCS12) WriteCertificate(
	parsedCertBundle *certutil.ParsedCertBundle,
	options cli.Options,
)

WriteCertificate persists a certificate bundle to the PKCS#12 KeyStore

type Updater

type Updater interface {
	WriteCertificate(parsedCertBundle *certutil.ParsedCertBundle, options cli.Options)
	ReadCertificate(options cli.Options) *x509.Certificate
	// contains filtered or unexported methods
}

Jump to

Keyboard shortcuts

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