From e09230192f06e5c468eb288e285f0a7cff924361 Mon Sep 17 00:00:00 2001 From: Scott Bronson Date: Fri, 18 Dec 2015 17:58:59 -0800 Subject: [PATCH] add --replace-all argument to ssl_certificates.py --- management/ssl_certificates.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/management/ssl_certificates.py b/management/ssl_certificates.py index 92f8a70d..0cc2fd22 100755 --- a/management/ssl_certificates.py +++ b/management/ssl_certificates.py @@ -182,10 +182,13 @@ def get_certificates_to_provision(env): domains.add(domain) else: cert = cert["certificate_object"] + import sys if cert.issuer == cert.subject: # This is self-signed. Get a real one. domains.add(domain) - + elif "--replace-all" in sys.argv: + domains.add(domain) + # Valid certificate today, but is it expiring soon? elif cert.not_valid_after-now < datetime.timedelta(days=14): domains.add(domain) @@ -709,4 +712,4 @@ def get_certificate_domains(cert): if __name__ == "__main__": # Provision certificates. - provision_certificates_cmdline() \ No newline at end of file + provision_certificates_cmdline()