From bb304946baa2d4a41e640d5adebff18052f88e8d Mon Sep 17 00:00:00 2001 From: Richard T Bonhomme Date: Mon, 15 Aug 2022 17:36:18 +0100 Subject: [PATCH] verify_ca_init: Reorder names to improve error message If verify_ca_init fails then the error message states that: 'serial is missing'. While this is true, it is not 'user friendly'. Reorder the checks so that if verify_ca_init fails then the error message will "probably" state that: 'ca.crt is missing', which makes more sense if the CA has not been initialised. Signed-off-by: Richard T Bonhomme --- easyrsa3/easyrsa | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easyrsa3/easyrsa b/easyrsa3/easyrsa index 3cd4805..9f0b446 100755 --- a/easyrsa3/easyrsa +++ b/easyrsa3/easyrsa @@ -887,7 +887,7 @@ verify_ca_init() { # Verify expected files are present. Allow files to be regular files # (or symlinks), but also pipes, for flexibility with ca.key - for i in serial index.txt index.txt.attr ca.crt private/ca.key; do + for i in ca.crt private/ca.key index.txt index.txt.attr serial; do if [ ! -f "$EASYRSA_PKI/$i" ] && [ ! -p "$EASYRSA_PKI/$i" ]; then [ "$1" = "test" ] && return 1 die "\