From bb1adae5856b6885cb4fbaf04b7305decad8566a Mon Sep 17 00:00:00 2001 From: Richard T Bonhomme Date: Tue, 5 Sep 2023 19:55:59 +0100 Subject: [PATCH] source_vars: FATAL error when default 'pki/vars' sets a different PKI Previously, this was a warning and confirmation to continue. Changed to, NEVER allow this invalid configuration. Signed-off-by: Richard T Bonhomme --- easyrsa3/easyrsa | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/easyrsa3/easyrsa b/easyrsa3/easyrsa index a0e729895..0d991a9fc 100755 --- a/easyrsa3/easyrsa +++ b/easyrsa3/easyrsa @@ -5887,22 +5887,16 @@ Algorithm '$EASYRSA_ALGO' is invalid: Must be 'rsa', 'ec' or 'ed'" : # ok else # Show warning - warn "\ + user_error "\ 'EASYRSA_PKI' is set incorrectly in the 'vars' file. This vars file: * $vars Uses this PKI: - * $EASYRSA_PKI" + * $EASYRSA_PKI - # Require user consent to continue - confirm "\ - Continue with invalid configuration ? " yes " - 'vars' configuration for 'EASYRSA_PKI' is invalid." - - verbose "\ -source_vars: Invalid PKI accepted for EASYRSA_PKI" +Cannot continue with invalid configuration." fi fi