File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 177
177
# 2017-01-03 Created check_config function to list all obvious config issues (2.02)
178
178
# 2017-01-10 force renew if FORCE_RENEWAL file exists (2.03)
179
179
# 2017-01-12 added drill, dig or host as alternatives to nslookup (2.04)
180
+ # 2017-01-18 bugfix issue #227 - error deleting csr if doesn't exist
181
+ # 2017-01-18 issue #228 check private key and account key are different (2.05)
180
182
# ----------------------------------------------------------------------------------------
181
183
182
184
PROGNAME=${0##*/ }
183
- VERSION=" 2.04 "
185
+ VERSION=" 2.05 "
184
186
185
187
# defaults
186
188
ACCOUNT_KEY_LENGTH=4096
@@ -316,6 +318,10 @@ check_config() { # check the config files for all obvious errors
316
318
info " ${DOMAIN} : invalid ACCOUNT_KEY_TYPE"
317
319
config_errors=true
318
320
fi
321
+ if [[ " $ACCOUNT_KEY " == " $DOMAIN_DIR /${DOMAIN} .key" ]]; then
322
+ info " ${DOMAIN} : ACCOUNT_KEY and domain key ( $DOMAIN_DIR /${DOMAIN} .key ) must be different"
323
+ config_errors=true
324
+ fi
319
325
if [[ ! " $PRIVATE_KEY_ALG " =~ ^(rsa| prime256v1| secp384r1| secp521r1)$ ]]; then
320
326
info " ${DOMAIN} : invalid PRIVATE_KEY_ALG"
321
327
config_errors=true
@@ -629,7 +635,9 @@ create_key() { # create a domain key (if it doesn't already exist)
629
635
esac
630
636
umask " $ORIG_UMASK "
631
637
# remove csr on generation of new domain key
632
- rm -f " ${key_loc::- 4} .csr"
638
+ if [[ -e " ${key_loc::- 4} .csr" ]]; then
639
+ rm -f " ${key_loc::- 4} .csr"
640
+ fi
633
641
fi
634
642
}
635
643
You can’t perform that action at this time.
0 commit comments