From b8455ad392ba40d0f03f167936dbfd130a433797 Mon Sep 17 00:00:00 2001 From: Richard T Bonhomme Date: Mon, 1 May 2023 19:58:40 +0100 Subject: [PATCH] import-req: Check input file exists Signed-off-by: Richard T Bonhomme --- easyrsa3/easyrsa | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/easyrsa3/easyrsa b/easyrsa3/easyrsa index 0377762..671cc9d 100755 --- a/easyrsa3/easyrsa +++ b/easyrsa3/easyrsa @@ -3266,6 +3266,11 @@ import_req() { Unable to import: incorrect command syntax. Run easyrsa without commands for usage and command help." + # Request file must exist + [ -e "$in_req" ] || die "\ +No request found for the input: '$2' +Expected to find the request at: $in_req" + verify_file req "$in_req" || die "\ The input file does not appear to be a certificate request. Aborting import. File Path: $in_req"