certstore

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CertRequest

type CertRequest struct {
	Domain     string   `json:"domain"`
	DomainIsCn bool     `json:"onlycn"`
	ValidDays  int      `json:"valid"`
	San        []string `json:"san"`
}

CertRequest contains information about the requested cert

type CertStore

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

func NewCertStore

func NewCertStore(acmeDirectory string, email string, challengeProvider challenge.Provider, storage store.Store, preferredChain string) (*CertStore, error)

func (*CertStore) GetCertificate

func (c *CertStore) GetCertificate(request *CertRequest) (*CertificateResource, error)

GetCertificate retrieves an certificate from acme or storage

func (*CertStore) GetUser

func (c *CertStore) GetUser() (*User, error)

func (*CertStore) SaveUser

func (c *CertStore) SaveUser(user registration.User) error

type CertificateResource

type CertificateResource struct {
	Domain            string `json:"domain"`
	PrivateKey        []byte `json:"key"`
	Certificate       []byte `json:"certificate"`
	IssuerCertificate []byte `json:"issuer"`
}

CertificateResource represent everything from our cert

func (*CertificateResource) GetNoBundleCertificate

func (c *CertificateResource) GetNoBundleCertificate() []byte

GetNoBundleCertificate ensures to return the cert without ca

type User

type User struct {
	Email        string                 `json:"email"`
	Registration *registration.Resource `json:"registration"`
	Key          []byte                 `json:"key"`
}

func (User) GetEmail

func (u User) GetEmail() string

func (User) GetPrivateKey

func (u User) GetPrivateKey() crypto.PrivateKey

func (User) GetRegistration

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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