Use tmp file for gen-crl output
The mv operation following the CRL creation isn't useful as there is no temp file to move. Instead, create the temp file during CRL creation, preventing a potential overwrite of a previous, valid, CRL. Thanks go to matteo.guglielmi@epfl.ch for this patch (via email). Signed-off-by: Eric F Crist <ecrist@secure-computing.net>
This commit is contained in:
parent
7c1fa0a258
commit
21ac0a76bc
@ -734,7 +734,7 @@ gen_crl() {
|
||||
|
||||
local out_file="$EASYRSA_PKI/crl.pem"
|
||||
out_file_tmp="$(mktemp -u "$out_file.XXXXXXXXXX")"; EASYRSA_TEMP_FILE_2="$out_file_tmp"
|
||||
"$EASYRSA_OPENSSL" ca -utf8 -gencrl -out "$out_file" -config "$EASYRSA_SSL_CONF" || die "\
|
||||
"$EASYRSA_OPENSSL" ca -utf8 -gencrl -out "$out_file_tmp" -config "$EASYRSA_SSL_CONF" || die "\
|
||||
CRL Generation failed.
|
||||
"
|
||||
mv "$out_file_tmp" "$out_file"; EASYRSA_TEMP_FILE_2=
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user