summaryrefslogtreecommitdiff
path: root/sign-ca.in
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2019-08-29 14:23:22 +0200
committerErich Eckner <git@eckner.net>2019-08-29 14:23:22 +0200
commit097d3fe90f0e242ecebd1a9bf9b06d6397bf3789 (patch)
treea6731323989f57bdda9e02e6a00845e847f4043d /sign-ca.in
parent623830c910a7fe0635fcde4d2a77dd8519d658c6 (diff)
downloadsimple-pki-097d3fe90f0e242ecebd1a9bf9b06d6397bf3789.tar.xz
make min duration configurable for ca and endpoint certificates
Diffstat (limited to 'sign-ca.in')
-rwxr-xr-xsign-ca.in4
1 files changed, 2 insertions, 2 deletions
diff --git a/sign-ca.in b/sign-ca.in
index 9752464..8d2f4b2 100755
--- a/sign-ca.in
+++ b/sign-ca.in
@@ -17,9 +17,9 @@ fi
if [ -f "${key_dir}/${ca_name}.key.new" ] \
&& [ -f "${key_dir}/${ca_name}.crt.new" ]; then
- if [ "$(stat -c%Y "${key_dir}/${ca_name}.key.new")" -lt "$(($(date +%s)-60*60*24*30))" ] \
+ if [ "$(stat -c%Y "${key_dir}/${ca_name}.key.new")" -lt "$(($(date +%s)-60*60*24*ca_min_duration))" ] \
|| [ ! -f "${key_dir}/${ca_name}.key" ] \
- || [ "$(stat -c%Y "${key_dir}/${ca_name}.crt.new")" -lt "$(($(date +%s)-60*60*24*30))" ] \
+ || [ "$(stat -c%Y "${key_dir}/${ca_name}.crt.new")" -lt "$(($(date +%s)-60*60*24*ca_min_duration))" ] \
|| [ ! -f "${key_dir}/${ca_name}.crt" ]; then
mv "${key_dir}/${ca_name}.key"{.new,}
mv "${key_dir}/${ca_name}.crt"{.new,}