From 854804f87d10cb6d35a7b29c1942f2346cffd6f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20K=C3=A4stel?= Date: Wed, 24 Oct 2018 14:01:27 +0200 Subject: [PATCH] Error out when the server requires External Account Binding and the user has not supplied kid and hmac key. --- certbot/client.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/certbot/client.py b/certbot/client.py index 05063eb9d..ba9daf45d 100644 --- a/certbot/client.py +++ b/certbot/client.py @@ -192,6 +192,10 @@ def perform_registration(acme, config, tos_cb): :rtype: `acme.messages.RegistrationResource` """ + if acme.client.directory.meta.external_account_required: + if config.eab_kid is None or config.eab_hmac_key is None: + raise errors.Error("Server requires external account binding. Please use --eab-kid and --eab-hmac-key.") + account_public_key = acme.client.net.key.public_key() try: return acme.new_account_and_tos(messages.NewRegistration.from_data(account_public_key=account_public_key,