3692 --dry-run expiration emails (#6015)

* If --dry-run is used and there exists no staging account, create account with no email

* added unit testing of dry-run to ensure certbot does not ask the user to create an email, and that certbot creates an account with no email
This commit is contained in:
TyrannosourceExe
2018-05-17 16:03:01 -07:00
committed by Brad Warren
parent 1be1bd9211
commit 9b2862ebb0
2 changed files with 25 additions and 5 deletions
+4
View File
@@ -155,6 +155,10 @@ def register(config, account_storage, tos_cb=None):
if not config.dry_run:
logger.info("Registering without email!")
# If --dry-run is used, and there is no staging account, create one with no email.
if config.dry_run:
config.email = None
# Each new registration shall use a fresh new key
key = jose.JWKRSA(key=jose.ComparableRSAKey(
rsa.generate_private_key(