From faf5fe25a37533e044d4565b8314c269ee1ec41e Mon Sep 17 00:00:00 2001 From: Richard T Bonhomme Date: Wed, 23 Oct 2024 17:34:36 +0100 Subject: [PATCH] Move 'inline' folder creation to inline_file() This ring-fences all inline code to inline_file() function. Signed-off-by: Richard T Bonhomme --- easyrsa3/easyrsa | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/easyrsa3/easyrsa b/easyrsa3/easyrsa index 2de8fbc55..ca1547c9f 100755 --- a/easyrsa3/easyrsa +++ b/easyrsa3/easyrsa @@ -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 @@ -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" @@ -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'." \