Documentation
¶
Index ¶
- Variables
- func MakeARICertID(leaf *x509.Certificate) (string, error)
- type AccountService
- func (a *AccountService) Deactivate(ctx context.Context, accountURL string) error
- func (a *AccountService) Get(ctx context.Context, accountURL string) (acme.Account, error)
- func (a *AccountService) KeyChange(ctx context.Context, newKey crypto.Signer) error
- func (a *AccountService) New(ctx context.Context, req acme.Account) (acme.ExtendedAccount, error)
- func (a *AccountService) NewEAB(ctx context.Context, req acme.Account, kid, hmacEncoded string) (acme.ExtendedAccount, error)
- func (a *AccountService) Update(ctx context.Context, accountURL string, req acme.Account) (acme.Account, error)
- type AuthorizationService
- type CertificateService
- func (c *CertificateService) Get(ctx context.Context, certURL string, bundle bool) (*acme.RawCertificate, error)
- func (c *CertificateService) GetAll(ctx context.Context, certURL string, bundle bool) (map[string]*acme.RawCertificate, error)
- func (c *CertificateService) GetRenewalInfo(ctx context.Context, certID string) (*acme.ExtendedRenewalInfo, error)
- func (c *CertificateService) Revoke(ctx context.Context, req acme.RevokeCertMessage) error
- type ChallengeService
- type Core
- type OrderOptions
- type OrderService
- func (o *OrderService) Get(ctx context.Context, orderURL string) (acme.ExtendedOrder, error)
- func (o *OrderService) New(ctx context.Context, domains []string, opts *OrderOptions) (acme.ExtendedOrder, error)
- func (o *OrderService) UpdateForCSR(ctx context.Context, orderURL string, csr []byte) (acme.ExtendedOrder, error)
Constants ¶
This section is empty.
Variables ¶
var ErrNoARI = errors.New("renewalInfo[get/post]: server does not advertise a renewal info endpoint")
ErrNoARI is returned when the server does not advertise a renewal info endpoint.
Functions ¶
func MakeARICertID ¶
func MakeARICertID(leaf *x509.Certificate) (string, error)
MakeARICertID constructs a certificate identifier as described in RFC 9773, section 4.1.
Types ¶
type AccountService ¶
type AccountService service
func (*AccountService) Deactivate ¶
func (a *AccountService) Deactivate(ctx context.Context, accountURL string) error
Deactivate Deactivates an account. https://www.rfc-editor.org/rfc/rfc8555.html#section-7.3.6
func (*AccountService) KeyChange ¶
KeyChange Changes the account key. https://www.rfc-editor.org/rfc/rfc8555.html#section-7.3.5
func (*AccountService) New ¶
func (a *AccountService) New(ctx context.Context, req acme.Account) (acme.ExtendedAccount, error)
New Creates a new account.
func (*AccountService) NewEAB ¶
func (a *AccountService) NewEAB(ctx context.Context, req acme.Account, kid, hmacEncoded string) (acme.ExtendedAccount, error)
NewEAB Creates a new account with an External Account Binding.
func (*AccountService) Update ¶
func (a *AccountService) Update(ctx context.Context, accountURL string, req acme.Account) (acme.Account, error)
Update Updates an account. https://www.rfc-editor.org/rfc/rfc8555.html#section-7.3.2 https://www.rfc-editor.org/rfc/rfc8555.html#section-7.3.3
type AuthorizationService ¶
type AuthorizationService service
func (*AuthorizationService) Deactivate ¶
func (c *AuthorizationService) Deactivate(ctx context.Context, authzURL string) error
Deactivate Deactivates an authorization.
func (*AuthorizationService) Get ¶
func (c *AuthorizationService) Get(ctx context.Context, authzURL string) (acme.Authorization, error)
Get Gets an authorization.
type CertificateService ¶
type CertificateService service
func (*CertificateService) Get ¶
func (c *CertificateService) Get(ctx context.Context, certURL string, bundle bool) (*acme.RawCertificate, error)
Get Returns the certificate and the issuer certificate. 'bundle' is only applied if the issuer is provided by the 'up' link.
func (*CertificateService) GetAll ¶
func (c *CertificateService) GetAll(ctx context.Context, certURL string, bundle bool) (map[string]*acme.RawCertificate, error)
GetAll the certificates and the alternate certificates. bundle' is only applied if the issuer is provided by the 'up' link.
func (*CertificateService) GetRenewalInfo ¶
func (c *CertificateService) GetRenewalInfo(ctx context.Context, certID string) (*acme.ExtendedRenewalInfo, error)
GetRenewalInfo GETs renewal information for a certificate from the renewalInfo endpoint. This is used to determine if a certificate needs to be renewed.
Note: this endpoint is part of a draft specification, not all ACME servers will implement it. This method will return api.ErrNoARI if the server does not advertise a renewal info endpoint.
func (*CertificateService) Revoke ¶
func (c *CertificateService) Revoke(ctx context.Context, req acme.RevokeCertMessage) error
Revoke Revokes a certificate.
type ChallengeService ¶
type ChallengeService service
func (*ChallengeService) Get ¶
func (c *ChallengeService) Get(ctx context.Context, chlgURL string) (acme.ExtendedChallenge, error)
Get Gets a challenge.
func (*ChallengeService) New ¶
func (c *ChallengeService) New(ctx context.Context, chlgURL string) (acme.ExtendedChallenge, error)
New Creates a challenge.
type Core ¶
type Core struct {
HTTPClient *http.Client
Accounts *AccountService
Authorizations *AuthorizationService
Certificates *CertificateService
Challenges *ChallengeService
Orders *OrderService
// contains filtered or unexported fields
}
Core ACME/LE core API.
func New ¶
func New(httpClient *http.Client, userAgent, caDirURL, kid string, privateKey crypto.Signer) (*Core, error)
New Creates a new Core.
func (*Core) GetDirectory ¶
type OrderOptions ¶
type OrderOptions struct {
NotBefore time.Time
NotAfter time.Time
// A string uniquely identifying the profile
// which will be used to affect issuance of the certificate requested by this Order.
// - https://www.ietf.org/archive/id/draft-ietf-acme-profiles-01.html#name-extensions-to-the-order-res
Profile string
// A string uniquely identifying a previously-issued certificate which this
// order is intended to replace.
// - https://www.rfc-editor.org/rfc/rfc9773.html#section-5
ReplacesCertID string
}
OrderOptions used to create an order (optional).
type OrderService ¶
type OrderService service
func (*OrderService) Get ¶
func (o *OrderService) Get(ctx context.Context, orderURL string) (acme.ExtendedOrder, error)
Get Gets an order.
func (*OrderService) New ¶
func (o *OrderService) New(ctx context.Context, domains []string, opts *OrderOptions) (acme.ExtendedOrder, error)
New Creates a new order.
func (*OrderService) UpdateForCSR ¶
func (o *OrderService) UpdateForCSR(ctx context.Context, orderURL string, csr []byte) (acme.ExtendedOrder, error)
UpdateForCSR Updates an order for a CSR.