summaryrefslogtreecommitdiff
path: root/rotate-keys.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 /rotate-keys.in
parent623830c910a7fe0635fcde4d2a77dd8519d658c6 (diff)
downloadsimple-pki-097d3fe90f0e242ecebd1a9bf9b06d6397bf3789.tar.xz
make min duration configurable for ca and endpoint certificates
Diffstat (limited to 'rotate-keys.in')
-rw-r--r--rotate-keys.in4
1 files changed, 2 insertions, 2 deletions
diff --git a/rotate-keys.in b/rotate-keys.in
index 0ba3480..724ea24 100644
--- a/rotate-keys.in
+++ b/rotate-keys.in
@@ -46,9 +46,9 @@ if [ "$(whoami)" != "${certificate_user}" ]; then
for host_key_file in ${host_key_files}; do
if [ -f "${key_dir}/${host_key_file}.key.new" ] \
&& [ -f "${key_dir}/${host_key_file}.crt.new" ]; then
- if [ "$(stat -c%Y "${key_dir}/${host_key_file}.key.new")" -ge "$(($(date +%s)-60*60*24*30))" ] \
+ if [ "$(stat -c%Y "${key_dir}/${host_key_file}.key.new")" -ge "$(($(date +%s)-60*60*24*key_min_duration))" ] \
&& [ -f "${key_dir}/${host_key_file}.key" ] \
- && [ "$(stat -c%Y "${key_dir}/${host_key_file}.crt.new")" -ge "$(($(date +%s)-60*60*24*30))" ] \
+ && [ "$(stat -c%Y "${key_dir}/${host_key_file}.crt.new")" -ge "$(($(date +%s)-60*60*24*key_min_duration))" ] \
&& [ -f "${key_dir}/${host_key_file}.crt" ]; then
continue
fi