From b2d6f7c2ac56f05b833fed304e95165735218ddd Mon Sep 17 00:00:00 2001 From: Richard T Bonhomme Date: Wed, 27 Mar 2024 03:15:23 +0000 Subject: [PATCH] gen-req: Make use of unsupported option --req-cn fatal Signed-off-by: Richard T Bonhomme --- easyrsa3/easyrsa | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/easyrsa3/easyrsa b/easyrsa3/easyrsa index ef9a8ca9e..e58b4d608 100755 --- a/easyrsa3/easyrsa +++ b/easyrsa3/easyrsa @@ -1923,7 +1923,13 @@ Run easyrsa without commands for usage and commands." fi # Enforce commonName - export EASYRSA_REQ_CN="$file_name_base" + if [ "$EASYRSA_REQ_CN" = ChangeMe ]; then + export EASYRSA_REQ_CN="$file_name_base" + else + user_error "\ +Option conflict: +* '$cmd' does not support setting an external commonName" + fi # Output files key_out="$EASYRSA_PKI/private/${file_name_base}.key"