Messages¶
ACME protocol messages.
-
exception
acme.messages.Error(**kwargs)[source]¶ Bases:
acme.jose.json_util.JSONObjectWithFields,acme.errors.ErrorACME error.
https://tools.ietf.org/html/draft-ietf-appsawg-http-problem-00
Variables: - typ (unicode) –
- title (unicode) –
- detail (unicode) –
-
description¶ Hardcoded error description based on its type.
Returns: Description if standard ACME error or None.Return type: unicode
-
class
acme.messages._Constant(name)[source]¶ Bases:
acme.jose.interfaces.JSONDeSerializable,_abcoll.HashableACME constant.
-
class
acme.messages.Status(name)[source]¶ Bases:
acme.messages._ConstantACME “status” field.
-
class
acme.messages.IdentifierType(name)[source]¶ Bases:
acme.messages._ConstantACME identifier type.
-
class
acme.messages.Identifier(**kwargs)[source]¶ Bases:
acme.jose.json_util.JSONObjectWithFieldsACME identifier.
Variables: - typ (IdentifierType) –
- value (unicode) –
-
class
acme.messages.Directory(jobj)[source]¶ Bases:
acme.jose.interfaces.JSONDeSerializableDirectory.
-
class
acme.messages.Resource(**kwargs)[source]¶ Bases:
acme.jose.json_util.JSONObjectWithFieldsACME Resource.
Variables: body (acme.messages.ResourceBody) – Resource body.
-
class
acme.messages.ResourceWithURI(**kwargs)[source]¶ Bases:
acme.messages.ResourceACME Resource with URI.
Variables: uri (unicode) – Location of the resource.
-
class
acme.messages.ResourceBody(**kwargs)[source]¶ Bases:
acme.jose.json_util.JSONObjectWithFieldsACME Resource Body.
-
class
acme.messages.Registration(**kwargs)[source]¶ Bases:
acme.messages.ResourceBodyRegistration Resource Body.
Variables: - key (acme.jose.jwk.JWK) – Public key.
- contact (tuple) – Contact information following ACME spec,
tupleofunicode. - agreement (unicode) –
- authorizations (unicode) – URI where
messages.Registration.Authorizationscan be found. - certificates (unicode) – URI where
messages.Registration.Certificatescan be found.
-
class
Authorizations(**kwargs)[source]¶ Bases:
acme.jose.json_util.JSONObjectWithFieldsAuthorizations granted to Account in the process of registration.
Variables: authorizations (tuple) – URIs to Authorization Resources.
-
class
Registration.Certificates(**kwargs)[source]¶ Bases:
acme.jose.json_util.JSONObjectWithFieldsCertificates granted to Account in the process of registration.
Variables: certificates (tuple) – URIs to Certificate Resources.
-
classmethod
Registration.from_data(phone=None, email=None, **kwargs)[source]¶ Create registration resource from contact details.
-
Registration.phones¶ All phones found in the
contactfield.
-
Registration.emails¶ All emails found in the
contactfield.
-
class
acme.messages.NewRegistration(**kwargs)[source]¶ Bases:
acme.messages.RegistrationNew registration.
-
class
acme.messages.UpdateRegistration(**kwargs)[source]¶ Bases:
acme.messages.RegistrationUpdate registration.
-
class
acme.messages.RegistrationResource(**kwargs)[source]¶ Bases:
acme.messages.ResourceWithURIRegistration Resource.
Variables: - body (acme.messages.Registration) –
- new_authzr_uri (unicode) – URI found in the ‘next’
Linkheader - terms_of_service (unicode) – URL for the CA TOS.
-
class
acme.messages.ChallengeBody(**kwargs)[source]¶ Bases:
acme.messages.ResourceBodyChallenge Resource Body.
Todo
Confusingly, this has a similar name to
challenges.Challenge, as well asachallenges.AnnotatedChallenge. Please use names such aschallbto distinguish instances of this class fromachall.Variables: - acme.challenges.Challenge – Wrapped challenge.
Conveniently, all challenge fields are proxied, i.e. you can
call
challb.xto getchallb.chall.xcontents. - status (acme.messages.Status) –
- validated (datetime.datetime) –
- error (messages.Error) –
- acme.challenges.Challenge – Wrapped challenge.
Conveniently, all challenge fields are proxied, i.e. you can
call
-
class
acme.messages.ChallengeResource(**kwargs)[source]¶ Bases:
acme.messages.ResourceChallenge Resource.
Variables: - body (acme.messages.ChallengeBody) –
- authzr_uri (unicode) – URI found in the ‘up’
Linkheader.
-
class
acme.messages.Authorization(**kwargs)[source]¶ Bases:
acme.messages.ResourceBodyAuthorization Resource Body.
Variables: - identifier (acme.messages.Identifier) –
- challenges (list) –
listofChallengeBody - combinations (tuple) – Challenge combinations (
tupleoftupleofint, as opposed tolistoflistfrom the spec). - status (acme.messages.Status) –
- expires (datetime.datetime) –
-
resolved_combinations¶ Combinations with challenges instead of indices.
-
class
acme.messages.NewAuthorization(**kwargs)[source]¶ Bases:
acme.messages.AuthorizationNew authorization.
-
class
acme.messages.AuthorizationResource(**kwargs)[source]¶ Bases:
acme.messages.ResourceWithURIAuthorization Resource.
Variables: - body (acme.messages.Authorization) –
- new_cert_uri (unicode) – URI found in the ‘next’
Linkheader
-
class
acme.messages.CertificateRequest(**kwargs)[source]¶ Bases:
acme.jose.json_util.JSONObjectWithFieldsACME new-cert request.
Variables: csr (acme.jose.util.ComparableX509) – OpenSSL.crypto.X509Reqwrapped inComparableX509
-
class
acme.messages.CertificateResource(**kwargs)[source]¶ Bases:
acme.messages.ResourceWithURICertificate Resource.
Variables: - body (acme.jose.util.ComparableX509) –
OpenSSL.crypto.X509wrapped inComparableX509 - cert_chain_uri (unicode) – URI found in the ‘up’
Linkheader - authzrs (tuple) –
tupleofAuthorizationResource.
- body (acme.jose.util.ComparableX509) –
-
class
acme.messages.Revocation(**kwargs)[source]¶ Bases:
acme.jose.json_util.JSONObjectWithFieldsRevocation message.
Variables: certificate (ComparableX509) – OpenSSL.crypto.X509wrapped inComparableX509