From 324db5587a583477795c737318d86a39ab82b9dc Mon Sep 17 00:00:00 2001 From: Richard T Bonhomme Date: Mon, 4 Dec 2023 20:13:59 +0000 Subject: [PATCH] Rename $raw_ssl_cnf_tmp, SSL config temp file, for clarity Rename $raw_ssl_cnf_tmp to $adjusted_ssl_cnf_tmp, to clarify that this is the EasyRSA edited SSL config file. Also, avoid confusion with 'build-ca raw' mode. Signed-off-by: Richard T Bonhomme --- easyrsa3/easyrsa | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/easyrsa3/easyrsa b/easyrsa3/easyrsa index 95c1e4918..d5ebf33ff 100755 --- a/easyrsa3/easyrsa +++ b/easyrsa3/easyrsa @@ -1701,9 +1701,9 @@ Raw CA mode fi # Assign tmp-file for config - raw_ssl_cnf_tmp="" - easyrsa_mktemp raw_ssl_cnf_tmp || \ - die "build_ca - easyrsa_mktemp raw_ssl_cnf_tmp" + adjusted_ssl_cnf_tmp="" + easyrsa_mktemp adjusted_ssl_cnf_tmp || \ + die "build_ca - easyrsa_mktemp adjusted_ssl_cnf_tmp" # Assign awkscript to insert EASYRSA_EXTRA_EXTS # shellcheck disable=SC2016 # vars don't expand in '' @@ -1734,12 +1734,12 @@ Raw CA mode print "$EASYRSA_EXTRA_EXTS" } | awk "$awkscript" "$EASYRSA_SSL_CONF" \ - > "$raw_ssl_cnf_tmp" || \ + > "$adjusted_ssl_cnf_tmp" || \ die "Copying X509_TYPES to config file failed" verbose "build-ca: insert x509 and extensions OK" # Use this new SSL config for the rest of this function - EASYRSA_SSL_CONF="$raw_ssl_cnf_tmp" + EASYRSA_SSL_CONF="$adjusted_ssl_cnf_tmp" # Generate CA Key case "$EASYRSA_ALGO" in @@ -1969,18 +1969,18 @@ $EASYRSA_EXTRA_EXTS" {print} }' # Assign temp-file for confg - raw_ssl_cnf_tmp="" - easyrsa_mktemp raw_ssl_cnf_tmp || \ - die "gen_req - easyrsa_mktemp raw_ssl_cnf_tmp" + adjusted_ssl_cnf_tmp="" + easyrsa_mktemp adjusted_ssl_cnf_tmp || \ + die "gen_req - easyrsa_mktemp adjusted_ssl_cnf_tmp" # Insert $extra_exts @ %EXTRA_EXTS% in SSL Config print "$extra_exts" | \ awk "$awkscript" "$EASYRSA_SSL_CONF" \ - > "$raw_ssl_cnf_tmp" || \ + > "$adjusted_ssl_cnf_tmp" || \ die "Writing SSL config to temp file failed" # Use this SSL config for the rest of this function - EASYRSA_SSL_CONF="$raw_ssl_cnf_tmp" + EASYRSA_SSL_CONF="$adjusted_ssl_cnf_tmp" fi # Name temp files @@ -2138,17 +2138,17 @@ to the latest Easy-RSA release." {print} }' # Assign temp-file for confg - raw_ssl_cnf_tmp="" - easyrsa_mktemp raw_ssl_cnf_tmp || \ - die "sign_req - easyrsa_mktemp raw_ssl_cnf_tmp" + adjusted_ssl_cnf_tmp="" + easyrsa_mktemp adjusted_ssl_cnf_tmp || \ + die "sign_req - easyrsa_mktemp adjusted_ssl_cnf_tmp" print "$copy_exts" | \ awk "$awkscript" "$EASYRSA_SSL_CONF" \ - > "$raw_ssl_cnf_tmp" || die "\ + > "$adjusted_ssl_cnf_tmp" || die "\ Writing 'copy_exts' to SSL config temp-file failed" # Use this SSL config for the rest of this function - EASYRSA_SSL_CONF="$raw_ssl_cnf_tmp" + EASYRSA_SSL_CONF="$adjusted_ssl_cnf_tmp" verbose "sign_req: Using '$copy_exts'" fi