From de7735115cac542539d5617a807b2d65965e5786 Mon Sep 17 00:00:00 2001 From: Richard T Bonhomme Date: Mon, 11 Apr 2022 23:32:17 +0100 Subject: [PATCH] Only warn if 'vars' is in PKI Signed-off-by: Richard T Bonhomme --- easyrsa3/easyrsa | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/easyrsa3/easyrsa b/easyrsa3/easyrsa index d42ea80..2123aef 100755 --- a/easyrsa3/easyrsa +++ b/easyrsa3/easyrsa @@ -2118,7 +2118,9 @@ Priority should be given to your PKI vars file: [ "$pwd_vars" ] && vars="$pwd_vars" [ "$easy_vars" ] && vars="$easy_vars" [ "$prog_vars" ] && vars="$prog_vars" - [ "$pki_vars" ] && vars="$pki_vars" + # Prioritise vars_in_pki + unset -v vars_in_pki && \ + [ "$pki_vars" ] && vars="$pki_vars" && vars_in_pki=1 fi # If $EASYRSA_NO_VARS is defined (not blank) then do not use vars @@ -2134,7 +2136,7 @@ file. Storing sensitive information in the configuration file is not recommended - please remove it from there before continuing. " fi - if grep -q "'" "$vars"; then + if [ "$vars_in_pki" ] && grep -q "'" "$vars"; then warn " Single quote (') has been found in the configuration file. This character is not supported in the configuration file.