From c1765bb54fbcc51c82c416ba1b52933c25c30902 Mon Sep 17 00:00:00 2001 From: Richard T Bonhomme Date: Tue, 26 Apr 2022 15:51:50 +0100 Subject: [PATCH] Add 'nopass' option to 'export-p12' command Plus a minor correction to white-space. Closes: #411 Original commit: commit e93af47b0112b13e221a1bf28d36afaf5f5719df Author: itaru2622 Date: Wed Oct 7 20:47:26 2020 +0900 supporting nopass option for export-p12 usage: easyrsa export-p12 EntityName nopass Signed-off-by: Richard T Bonhomme --- easyrsa3/easyrsa | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/easyrsa3/easyrsa b/easyrsa3/easyrsa index e51fe06..92c86b9 100755 --- a/easyrsa3/easyrsa +++ b/easyrsa3/easyrsa @@ -1825,6 +1825,12 @@ Missing key expected at: $key_in" nokeys=1 fi + # For 'nopass' pkcs12 requires an explicit empty password 'pass: ' + if [ -z "$want_pass" ]; then + EASYRSA_PASSIN=pass: + EASYRSA_PASSOUT=pass: + fi + # export the p12: easyrsa_openssl pkcs12 -in "$crt_in" -inkey "$key_in" -export \ -out "$pkcs_out" \