issuance

package
v0.0.0-...-6c2b09f Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2016 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package issuance facilitates the issuance of certificates via the ACME protocol.

Index

Constants

View Source
const DefaultWorkspace = "./certs_data"

DefaultWorkspace is where assets will be stored if no custom Workspace variable is set by the importing package.

Variables

View Source
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.

View Source
var ServerURL string

ServerURL is the URL to the ACME CA's directory. This must be set before obtaining certificates.

Workspace is where this program stores assets.

Functions

This section is empty.

Types

type ObtainError

type ObtainError map[string]error

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) Site

func (s Storage) Site(domain string) string

Site returns the path to the folder containing assets for domain.

func (Storage) SiteCertFile

func (s Storage) SiteCertFile(domain string) string

SiteCertFile returns the path to the certificate file for domain.

func (Storage) SiteKeyFile

func (s Storage) SiteKeyFile(domain string) string

SiteKeyFile returns the path to domain's private key file.

func (Storage) SiteMetaFile

func (s Storage) SiteMetaFile(domain string) string

SiteMetaFile returns the path to the domain's asset metadata file.

func (Storage) Sites

func (s Storage) Sites() string

Sites gets the directory that stores site certificate and keys.

func (Storage) User

func (s Storage) User(email string) string

User gets the account folder for the user with email.

func (Storage) UserKeyFile

func (s Storage) UserKeyFile(email string) string

UserKeyFile gets the path to the private key file for the user with the given email address.

func (Storage) UserRegFile

func (s Storage) UserRegFile(email string) string

UserRegFile gets the path to the registration file for the user with the given email address.

func (Storage) Users

func (s Storage) Users() string

Users gets the directory that stores account folders.

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

func GetUser(email string) (*User, error)

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) GetEmail

func (u *User) GetEmail() string

GetEmail gets u's email.

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

func (u *User) ObtainCerts(bundles [][]string) error

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.

func (*User) Resume

func (rl *User) Resume()

Resume resets the interval back to 0.

func (*User) Wait

func (rl *User) Wait()

Wait waits the duration of the interval.

Jump to

Keyboard shortcuts

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