Conform to RFC 1945

This commit is contained in:
Peter Eckersley
2017-04-05 11:54:23 -07:00
parent 4846217445
commit a313eebc7f
2 changed files with 10 additions and 7 deletions
+8 -5
View File
@@ -53,12 +53,15 @@ def determine_user_agent(config):
""" """
if config.user_agent is None: if config.user_agent is None:
auto = "no" if cli.cli_command == "certbot" else "yes" if cli.cli_command in ["certbot", "letsencrypt", "certbot-auto", "letsencrypt-auto"]:
ua = ("CertbotACMEClient/{0} ({1}) Authenticator/{2} Installer/{3} Verb/{4} " auto = cli.cli_command
"Renewing/{5} Auto/{6} Py/{7}") else:
ua = ua.format(certbot.__version__, util.get_os_info_ua(), auto = "other"
ua = ("CertbotACMEClient/{0} ({1}; {2}) Authenticator/{3} Installer/{4} "
"({5}; renewing:{6}) Py/{7}")
ua = ua.format(certbot.__version__, auto, util.get_os_info_ua(),
config.authenticator, config.installer, config.verb, config.renewing, config.authenticator, config.installer, config.verb, config.renewing,
auto, platform.python_version()) platform.python_version())
else: else:
ua = config.user_agent ua = config.user_agent
return ua return ua
+2 -2
View File
@@ -226,9 +226,9 @@ def _find_cert(config, domains, certname):
""" """
action, lineage = _find_lineage_for_domains_and_certname(config, domains, certname) action, lineage = _find_lineage_for_domains_and_certname(config, domains, certname)
if action == "renew": if action == "renew":
config.renewing = "Yes" config.renewing = "yes"
elif action == "newcert": elif action == "newcert":
config.renewing = "No" config.renewing = "no"
if action == "reinstall": if action == "reinstall":
logger.info("Keeping the existing certificate") logger.info("Keeping the existing certificate")
return (action != "reinstall"), lineage return (action != "reinstall"), lineage