Add explicit client versioning. (#60)

The latest acme-v2 branch adds the ACME version as part of a client constructor.
This commit is contained in:
Jacob Hoffman-Andrews 2017-11-28 05:23:39 -08:00 committed by Daniel McCarney
parent 7735de33f6
commit 604c5131a2
1 changed files with 2 additions and 2 deletions

View File

@ -42,10 +42,10 @@ def make_client(email=None):
"""Build an acme.Client and register a new account with a random key."""
key = jose.JWKRSA(key=rsa.generate_private_key(65537, 2048, default_backend()))
net = acme_client.ClientNetwork(key, verify_ssl=False,
net = acme_client.ClientNetwork(key, verify_ssl=False, acme_version=2,
user_agent="Boulder integration tester")
client = acme_client.Client(DIRECTORY, key=key, net=net)
client = acme_client.Client(DIRECTORY, key=key, net=net, acme_version=2)
tos = client.directory.meta.terms_of_service
if tos is not None and "Do%20what%20thou%20wilt" in tos:
net.account = client.register(messages.NewRegistration.from_data(email=email,