Merge branch 'pkcs12_alias' of ssh://github.com/jdelker/easy-rsa into jdelker-pkcs12_alias

Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
This commit is contained in:
Richard T Bonhomme 2022-04-25 12:53:54 +01:00
commit 51857fbeca
No known key found for this signature in database
GPG Key ID: 2D767DB92FB6C246

View File

@ -164,7 +164,8 @@ cmd_help() {
Export a PKCS#12 file with the keypair specified by <filename_base>"
opts="
noca - do not include the ca.crt file in the PKCS12 output
nokey - do not include the private key in the PKCS12 output" ;;
nokey - do not include the private key in the PKCS12 output
usefn - use <filename_base> as friendly name" ;;
export-p7) text="
export-p7 <filename_base> [ cmd-opts ]
Export a PKCS#7 file with the pubkey specified by <filename_base>"
@ -1767,6 +1768,7 @@ Run easyrsa without commands for usage and command help."
noca) want_ca="" ;;
nokey) want_key="" ;;
nopass) want_pass="" ;;
usefn) pkcs_friendly_name=$short_name ;;
*) warn "Ignoring unknown command option: '$1'"
esac
shift
@ -1802,6 +1804,7 @@ Missing key expected at: $key_in"
easyrsa_openssl pkcs12 -in "$crt_in" -inkey "$key_in" -export \
-out "$pkcs_out" \
${nokeys:+ -nokeys} \
${pkcs_friendly_name:+ -name "$pkcs_friendly_name"} \
${pkcs_certfile_path:+ -certfile "$pkcs_certfile_path"} \
${EASYRSA_PASSIN:+ -passin "$EASYRSA_PASSIN"} \
${EASYRSA_PASSOUT:+ -passout "$EASYRSA_PASSOUT"} || die "\