cert_helper

package
v0.0.0-...-a8af831 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2024 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitLego

func InitLego(storage storage.StorageService, aliConfig *aliapi.Config, email string, caDirURL string) *lego.Client

Types

type AcmeUser

type AcmeUser struct {
	Email        string
	Registration *registration.Resource
	// contains filtered or unexported fields
}

func (*AcmeUser) GetEmail

func (u *AcmeUser) GetEmail() string

func (*AcmeUser) GetPrivateKey

func (u *AcmeUser) GetPrivateKey() crypto.PrivateKey

func (AcmeUser) GetRegistration

func (u AcmeUser) GetRegistration() *registration.Resource

type CertManager

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

func NewCertManager

func NewCertManager(config *aliapi.Config, lego *lego.Client, storage storage.StorageService) *CertManager

func (*CertManager) CleanCasDuplicateCertificate

func (m *CertManager) CleanCasDuplicateCertificate()

func (*CertManager) CleanCasExpiredCertificate

func (m *CertManager) CleanCasExpiredCertificate()

func (*CertManager) GetCertificate

func (m *CertManager) GetCertificate(commonName string) (*Certificate, error)

func (*CertManager) GetCertificateFromStorage

func (m *CertManager) GetCertificateFromStorage(commonName string) (*Certificate, error)

func (*CertManager) SearchAvailableCertificateFromCas

func (m *CertManager) SearchAvailableCertificateFromCas(commonName string) (*Certificate, error)

func (*CertManager) UploadCertificateToCas

func (m *CertManager) UploadCertificateToCas(cert *Certificate) error

type Certificate

type Certificate struct {
	CommonName       string
	CasCertificateId int64

	PrivateKey        []byte
	Certificate       []byte
	IssuerCertificate []byte

	Updated bool
	// contains filtered or unexported fields
}

func (*Certificate) CasName

func (c *Certificate) CasName() string

func (*Certificate) MatchDomain

func (c *Certificate) MatchDomain(domain string) bool

func (*Certificate) SetCasCertificateId

func (c *Certificate) SetCasCertificateId(id int64)

func (*Certificate) SetCasName

func (c *Certificate) SetCasName(name string)

func (*Certificate) X509Certificate

func (c *Certificate) X509Certificate() *x509.Certificate

Jump to

Keyboard shortcuts

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