From 93a8980c5eb8047ea907fdefd6dd8cdc4d85944b Mon Sep 17 00:00:00 2001 From: Richard T Bonhomme Date: Sat, 15 Jul 2023 21:43:47 +0100 Subject: [PATCH] sign-req: Error check creation of x509-type temp-files Signed-off-by: Richard T Bonhomme --- easyrsa3/easyrsa | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/easyrsa3/easyrsa b/easyrsa3/easyrsa index 0044f6b..a53756e 100755 --- a/easyrsa3/easyrsa +++ b/easyrsa3/easyrsa @@ -2263,7 +2263,9 @@ Writing 'copy_exts' to SSL config temp-file failed" easyrsa_mktemp x509_type_tmp || \ die "sign_req - easyrsa_mktemp x509_type_tmp" - create_x509_type "$crt_type" > "$x509_type_tmp" + create_x509_type "$crt_type" > "$x509_type_tmp" || \ + die "sign_req - create_x509_type $crt_type" + x509_type_file="$x509_type_tmp" fi @@ -2277,7 +2279,9 @@ Writing 'copy_exts' to SSL config temp-file failed" easyrsa_mktemp x509_COMMON_tmp || \ die "sign_req - easyrsa_mktemp x509_COMMON_tmp" - create_x509_type COMMON > "$x509_COMMON_tmp" + create_x509_type COMMON > "$x509_COMMON_tmp" || \ + die "sign_req - create_x509_type COMMON" + x509_COMMON_file="$x509_type_tmp" fi