Skip to content

Commit

Permalink
Merge branch 'Tabiskabis-gen_crl-preserve-permissions'
Browse files Browse the repository at this point in the history
Signed-off-by: Richard T Bonhomme <[email protected]>
  • Loading branch information
TinCanTech committed Sep 20, 2023
2 parents e6b8e62 + 057fba0 commit f426149
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion easyrsa3/easyrsa
Original file line number Diff line number Diff line change
Expand Up @@ -3734,12 +3734,18 @@ gen_crl() {
easyrsa_mktemp out_file_tmp || \
die "gen_crl - easyrsa_mktemp out_file_tmp"

if [ -r "$out_file" ]; then
cp -p "$out_file" "$out_file_tmp" || \
warn "Failed to preserve CRL file permissions."
fi

easyrsa_openssl ca -utf8 -gencrl -out "$out_file_tmp" \
${EASYRSA_CRL_DAYS:+ -days "$EASYRSA_CRL_DAYS"} \
${EASYRSA_PASSIN:+ -passin "$EASYRSA_PASSIN"} || \
die "CRL Generation failed."

mv ${EASYRSA_BATCH:+ -f} "$out_file_tmp" "$out_file"
mv ${EASYRSA_BATCH:+ -f} "$out_file_tmp" "$out_file" || \
die "Failed to update CRL file."

notice "\
An updated CRL has been created:
Expand Down

0 comments on commit f426149

Please sign in to comment.