Skip to content

Commit

Permalink
Move 'inline' folder creation to inline_file()
Browse files Browse the repository at this point in the history
This ring-fences all inline code to inline_file() function.

Signed-off-by: Richard T Bonhomme <[email protected]>
  • Loading branch information
TinCanTech committed Oct 23, 2024
1 parent cfe7746 commit faf5fe2
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions easyrsa3/easyrsa
Original file line number Diff line number Diff line change
Expand Up @@ -1461,7 +1461,7 @@ Please delete the key above that is no longer in use."

# new dirs:
easyrsa_mkdir "$EASYRSA_PKI"
for i in issued private reqs inline; do
for i in issued private reqs; do
easyrsa_mkdir "${EASYRSA_PKI}/$i"
done

Expand Down Expand Up @@ -2982,6 +2982,10 @@ inline_file() {
# definitive source
[ "$1" ] || die "inline_file - Missing file_name_base"

# make inline dirs
easyrsa_mkdir "$EASYRSA_PKI"/inline
easyrsa_mkdir "$EASYRSA_PKI"/inline/private

# Source files
crt_source="${EASYRSA_PKI}/issued/${1}.crt"
key_source="${EASYRSA_PKI}/private/${1}.key"
Expand All @@ -2991,8 +2995,6 @@ inline_file() {

# output
inline_out="${EASYRSA_PKI}/inline/${1}.inline"
easyrsa_mkdir "$EASYRSA_PKI"/inline
easyrsa_mkdir "$EASYRSA_PKI"/inline/private
print "\
# Inline files in the 'private' directory contain security keys which
# MUST only be transmitted over a secure connection, such as 'scp'." \
Expand Down

0 comments on commit faf5fe2

Please sign in to comment.