certstorage

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VaultAccountKeyUri     = "uri"
	VaultAccountKeyEmail   = "email"
	VaultAccountKeyAccount = "account"
	VaultAccountKeyKey     = "key"
)

Variables

This section is empty.

Functions

func CertToMap

func CertToMap(res *AcmeCertificate) map[string]interface{}

func ConvertToPem

func ConvertToPem(privateKey crypto.PrivateKey) (string, error)

func FromPem

func FromPem(keyData []byte) (crypto.PrivateKey, error)

Types

type AccountStorage

type AccountStorage interface {
	WriteAccount(AcmeAccount) error
	ReadAccount(hash string) (*AcmeAccount, error)
	Cleanup()
}

type AcmeAccount

type AcmeAccount struct {
	Email        string
	Key          crypto.PrivateKey
	Registration *registration.Resource
}

func (AcmeAccount) GetEmail

func (account AcmeAccount) GetEmail() string

func (AcmeAccount) GetPrivateKey

func (account AcmeAccount) GetPrivateKey() crypto.PrivateKey

func (AcmeAccount) GetRegistration

func (account AcmeAccount) GetRegistration() *registration.Resource

func (AcmeAccount) IsInitialized

func (account AcmeAccount) IsInitialized() bool

func (AcmeAccount) Validate

func (account AcmeAccount) Validate()

type AcmeCertificate

type AcmeCertificate struct {
	Domain            string `json:"domain"`
	CertURL           string `json:"certUrl"`
	CertStableURL     string `json:"certStableUrl"`
	PrivateKey        []byte `json:"-"`
	Certificate       []byte `json:"-"`
	IssuerCertificate []byte `json:"-"`
	CSR               []byte `json:"-"`
}

func MapToCert

func MapToCert(data map[string]interface{}) (*AcmeCertificate, error)

func (*AcmeCertificate) AsPem added in v1.4.0

func (cert *AcmeCertificate) AsPem() (pem string)

func (*AcmeCertificate) GetDurationUntilExpiry

func (cert *AcmeCertificate) GetDurationUntilExpiry() (time.Duration, error)

func (*AcmeCertificate) GetExpiryTimestamp

func (cert *AcmeCertificate) GetExpiryTimestamp() (time.Time, error)

type CertMetadata added in v1.3.0

type CertMetadata struct {
	Expiry time.Time
	Domain string
}

func (*CertMetadata) GetDurationUntilExpiry added in v1.3.0

func (cert *CertMetadata) GetDurationUntilExpiry() time.Duration

type CertStorage

type CertStorage interface {
	WriteCertificate(resource *AcmeCertificate) error
	ReadPublicCertificateData(domain string) (*AcmeCertificate, error)
	ReadFullCertificateData(domain string) (*AcmeCertificate, error)
	Cleanup()
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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