From 555760164b8fc178fbcf73d0507cb84322319572 Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Mon, 30 Sep 2019 15:05:07 +0200 Subject: [PATCH] Fix keylength --- wo/cli/plugins/site.py | 9 ++++++--- wo/core/acme.py | 2 +- wo/core/variables.py | 2 -- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/wo/cli/plugins/site.py b/wo/cli/plugins/site.py index 4221d50..50ee089 100644 --- a/wo/cli/plugins/site.py +++ b/wo/cli/plugins/site.py @@ -738,7 +738,9 @@ class WOSiteCreateController(CementBaseController): if data['letsencrypt'] is True: Log.debug(self, "Going to issue Let's Encrypt certificate") acmedata = dict(acme_domains, dns=False, acme_dns='dns_cf', - dnsalias=False, acme_alias='') + dnsalias=False, acme_alias='', keylength='') + acmedata['keylength'] = self.app.config.get('letsencrypt', + 'keylength') if pargs.dns: Log.debug(self, "DNS validation enabled") acmedata['dns'] = True @@ -1240,10 +1242,11 @@ class WOSiteUpdateController(CementBaseController): if pargs.letsencrypt: acme_domains = [] acmedata = dict(acme_domains, dns=False, acme_dns='dns_cf', - dnsalias=False, acme_alias='') + dnsalias=False, acme_alias='', keylength='') (wo_domain_type, wo_root_domain) = WODomain.getdomainlevel( self, wo_domain) - + acmedata['keylength'] = self.app.config.get('letsencrypt', + 'keylength') if pargs.letsencrypt == 'on': data['letsencrypt'] = True letsencrypt = True diff --git a/wo/core/acme.py b/wo/core/acme.py index e6cafd3..6945a38 100644 --- a/wo/core/acme.py +++ b/wo/core/acme.py @@ -16,7 +16,7 @@ class WOAcme: """Issue SSL certificates with acme.sh""" all_domains = '\' -d \''.join(acme_domains) wo_acme_dns = acmedata['acme_dns'] - keylenght = "{0}".format(WOVariables.wo_keylength) + keylenght = acmedata['keylength'] wo_acme_exec = ("/etc/letsencrypt/acme.sh --config-home " "'/etc/letsencrypt/config'") if acmedata['dns'] is True: diff --git a/wo/core/variables.py b/wo/core/variables.py index 7049136..d5ce887 100644 --- a/wo/core/variables.py +++ b/wo/core/variables.py @@ -111,8 +111,6 @@ class WOVariables(): wo_nginx = ["nginx-custom", "nginx-wo"] wo_nginx_key = '188C9FB063F0247A' - wo_keylength = self.app.config.get('letsencrypt', 'keylength') - wo_php = ["php7.2-fpm", "php7.2-curl", "php7.2-gd", "php7.2-imap", "php7.2-readline", "php7.2-common", "php7.2-recode", "php7.2-cli", "php7.2-mbstring", "php7.2-intl",