From 9047c958503a056261fd8d8b34a7cf15b2927274 Mon Sep 17 00:00:00 2001 From: Richard T Bonhomme Date: Thu, 26 Jan 2023 00:37:26 +0000 Subject: [PATCH] build-ca: Minor code reformat (aesthetics) Signed-off-by: Richard T Bonhomme --- easyrsa3/easyrsa | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/easyrsa3/easyrsa b/easyrsa3/easyrsa index 172ef75..9686711 100755 --- a/easyrsa3/easyrsa +++ b/easyrsa3/easyrsa @@ -1343,7 +1343,7 @@ This openssl config file does not support X509-type 'ca'. Please update openssl-easyrsa.cnf to the latest release." fi - # create necessary files and dirs: + # create necessary dirs: err_msg="\ Unable to create necessary PKI files (permissions?)" for i in issued inline certs_by_serial \ @@ -1352,13 +1352,14 @@ Unable to create necessary PKI files (permissions?)" do mkdir -p "$EASYRSA_PKI/$i" || die "$err_msg" done - printf "" > "$EASYRSA_PKI/index.txt" || \ - die "$err_msg" - attrib='unique_subject = no' - printf '%s\n' "$attrib" > "$EASYRSA_PKI/index.txt.attr" || \ - die "$err_msg" - printf '%s\n' "01" > "$EASYRSA_PKI/serial" || \ - die "$err_msg" + + # create necessary files: + printf "" > \ + "$EASYRSA_PKI/index.txt" || die "$err_msg" + printf '%s\n' 'unique_subject = no' \ + > "$EASYRSA_PKI/index.txt.attr" || die "$err_msg" + printf '%s\n' "01" \ + > "$EASYRSA_PKI/serial" || die "$err_msg" unset -v err_msg # Set ssl batch mode, as required