summaryrefslogtreecommitdiff
path: root/net/acme
diff options
context:
space:
mode:
authorDavid Yang <mmyangfl@gmail.com>2020-04-27 09:57:09 +0800
committerDavid Yang <mmyangfl@gmail.com>2020-04-27 17:54:36 +0800
commit0d2240481b75222a4a86195660b7d4b1a6c97f1f (patch)
tree66e4e4183f24c737ea216b5a962e187d22b5791d /net/acme
parent6a4c1b20517da72c590e67e1e2644c720fc50a8b (diff)
acme: Handle ecc cert correctly
Error was: The domain 'example.com' seems to have a ECC cert already, please add '--ecc' parameter if you want to use that cert. Signed-off-by: David Yang <mmyangfl@gmail.com>
Diffstat (limited to 'net/acme')
-rw-r--r--net/acme/files/run.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/acme/files/run.sh b/net/acme/files/run.sh
index b01003687..bec94bcce 100644
--- a/net/acme/files/run.sh
+++ b/net/acme/files/run.sh
@@ -183,6 +183,7 @@ issue_cert()
local update_uhttpd
local update_nginx
local keylength
+ local keylength_ecc=0
local domains
local main_domain
local moved_staging=0
@@ -215,6 +216,7 @@ issue_cert()
if echo $keylength | grep -q "^ec-"; then
domain_dir="$STATE_DIR/${main_domain}_ecc"
+ keylength_ecc=1
else
domain_dir="$STATE_DIR/${main_domain}"
fi
@@ -234,6 +236,7 @@ issue_cert()
moved_staging=1
else
log "Found previous cert config. Issuing renew."
+ [ "$keylength_ecc" -eq "1" ] && acme_args="$acme_args --ecc"
run_acme --home "$STATE_DIR" --renew -d "$main_domain" $acme_args && ret=0 || ret=1
post_checks
return $ret