summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2019-12-09 09:55:28 +0100
committerErich Eckner <git@eckner.net>2019-12-09 09:55:28 +0100
commit056402c1aa1f5bc3296755283cc8bcdf76815643 (patch)
treec0783a88eda3d097082cd27ebe37d97a2934ca80
parentc065f5f092e38209080492e4ab33a392255554f8 (diff)
downloadsimple-pki-056402c1aa1f5bc3296755283cc8bcdf76815643.tar.xz
ca_min_duration -> ca_keep_duration
-rw-r--r--etc/ca.conf2
-rwxr-xr-xsign-ca.in2
2 files changed, 2 insertions, 2 deletions
diff --git a/etc/ca.conf b/etc/ca.conf
index b4e8ca3..aa8b4ba 100644
--- a/etc/ca.conf
+++ b/etc/ca.conf
@@ -1,7 +1,7 @@
#!/bin/bash
# how long do we keep the old signature of the root-ca (days)
-ca_min_duration=60
+ca_keep_duration=60
# which system user owns the ca
ca_user='erich'
diff --git a/sign-ca.in b/sign-ca.in
index f000dc3..9d1bb43 100755
--- a/sign-ca.in
+++ b/sign-ca.in
@@ -16,7 +16,7 @@ fi
if [ -f '#ETCDIR#/simple-pki/ca/root-ca.crt' ]; then
if [ ! -f '#ETCDIR#/simple-pki/ca/root-ca.crt.old' ] \
- || [ "$(stat -c%Y '#ETCDIR#/simple-pki/ca/root-ca.crt.old')" -lt "$(($(date +%s)-60*60*24*ca_min_duration))" ]; then
+ || [ "$(stat -c%Y '#ETCDIR#/simple-pki/ca/root-ca.crt.old')" -lt "$(($(date +%s)-60*60*24*ca_keep_duration))" ]; then
mv \
'#ETCDIR#/simple-pki/ca/root-ca.crt' \
'#ETCDIR#/simple-pki/ca/root-ca.crt.old'