Skip to content

Commit

Permalink
install_data_to_pki: Never create a pki/vars.example file
Browse files Browse the repository at this point in the history
Having a pki/vars.example file exist, leads to the incorrect conclusion
that a pki/vars file is suitable. Therefore, never create an example file.

Signed-off-by: Richard T Bonhomme <[email protected]>
  • Loading branch information
TinCanTech committed Aug 30, 2023
1 parent f18c9a0 commit fcb1011
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions easyrsa3/easyrsa
Original file line number Diff line number Diff line change
Expand Up @@ -1456,7 +1456,6 @@ install_data_to_pki() {

# Find other files - Omitting "$vars_file"
for source in \
"$vars_file_example" \
"$ssl_cnf_file" \
# EOL
do
Expand All @@ -1481,16 +1480,6 @@ install_data_to_pki $context: $EASYRSA_EXT_DIR"
return
fi

# Always require a pki/vars.example file
if [ -e "$EASYRSA_PKI/vars.example" ];then
: # ok
else
create_vars_example > "$EASYRSA_PKI/vars.example" || \
die "install_data_to_pki - create_vars_example FAILED"
verbose "\
install_data_to_pki $context: create_vars_example OK"
fi

# Create PKI/vars from PKI/example
unset -v new_vars_true
if [ "$found_vars" = 1 ] || [ "$user_vars_true" ] || \
Expand Down

0 comments on commit fcb1011

Please sign in to comment.