Add 'nopass' option to 'export-p12' command

Plus a minor correction to white-space.

Closes: #411

Original commit:

commit e93af47b0112b13e221a1bf28d36afaf5f5719df
Author: itaru2622 <itaru2622@gmaiil.com>
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 <tincantech@protonmail.com>
This commit is contained in:
Richard T Bonhomme 2022-04-26 15:51:50 +01:00
parent d9ec677ac7
commit c1765bb54f
No known key found for this signature in database
GPG Key ID: 2D767DB92FB6C246

View File

@ -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" \