Documentation ¶
Overview ¶
Package issuance facilitates the issuance of certificates via the ACME protocol.
Index ¶
- Constants
- Variables
- type ObtainError
- type Storage
- func (s Storage) Site(domain string) string
- func (s Storage) SiteCertFile(domain string) string
- func (s Storage) SiteKeyFile(domain string) string
- func (s Storage) SiteMetaFile(domain string) string
- func (s Storage) Sites() string
- func (s Storage) User(email string) string
- func (s Storage) UserKeyFile(email string) string
- func (s Storage) UserRegFile(email string) string
- func (s Storage) Users() string
- type User
Constants ¶
const DefaultWorkspace = "./certs_data"
DefaultWorkspace is where assets will be stored if no custom Workspace variable is set by the importing package.
Variables ¶
var Agree bool
Agree is whether the user agrees to the CA's service agreement. This need only be true if the user has not agreed before.
var ServerURL string
ServerURL is the URL to the ACME CA's directory. This must be set before obtaining certificates.
var Workspace = Storage(DefaultWorkspace)
Workspace is where this program stores assets.
Functions ¶
This section is empty.
Types ¶
type ObtainError ¶
ObtainError maps failures keyed by domain name to their error message.
func (ObtainError) Error ¶
func (e ObtainError) Error() string
Error returns a formatted, descriptive error message of failures in e.
type Storage ¶
type Storage string
Storage is a root directory and facilitates forming file paths derived from it.
func (Storage) SiteCertFile ¶
SiteCertFile returns the path to the certificate file for domain.
func (Storage) SiteKeyFile ¶
SiteKeyFile returns the path to domain's private key file.
func (Storage) SiteMetaFile ¶
SiteMetaFile returns the path to the domain's asset metadata file.
func (Storage) UserKeyFile ¶
UserKeyFile gets the path to the private key file for the user with the given email address.
func (Storage) UserRegFile ¶
UserRegFile gets the path to the registration file for the user with the given email address.
type User ¶
type User struct { Email string Registration *acme.RegistrationResource // contains filtered or unexported fields }
User is type that can interact with an ACME server.
func GetUser ¶
GetUser loads the user with the given email from disk. If the user does not exist, it will create a new one, but it will NOT save new user to the disk or register it via ACME.
func (*User) BackOff ¶
func (rl *User) BackOff()
BackOff tells the rate limiter to throttle another step.
func (*User) GetPrivateKey ¶
func (u *User) GetPrivateKey() *rsa.PrivateKey
GetPrivateKey gets u's private key.
func (*User) GetRegistration ¶
func (u *User) GetRegistration() *acme.RegistrationResource
GetRegistration gets u's registration resource.
func (*User) ObtainCerts ¶
ObtainCerts obtains certificates in bundles, where each slice in the slice is a list of domains to put onto the certificate. This function is robust in handling rate limiting and will retry until it succeeds.