From fb7218fce5acc3477df4db100d2f5d68f1f52f5f Mon Sep 17 00:00:00 2001 From: eddyhub Date: Mon, 19 Feb 2018 06:08:26 +0100 Subject: [PATCH] Rename parameters... --- acme.sh | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/acme.sh b/acme.sh index 415eb246..5b7c3bbd 100755 --- a/acme.sh +++ b/acme.sh @@ -1192,13 +1192,13 @@ _toPkcs() { _ccert="$3" _cca="$4" pfxPassword="$5" - pfxName="$6" + pfxAlias="$6" pfxCaname="$7" if [ "$pfxCaname" ]; then - ${ACME_OPENSSL_BIN:-openssl} pkcs12 -export -out "$_cpfx" -inkey "$_ckey" -in "$_ccert" -certfile "$_cca" -password "pass:$pfxPassword" -name "$pfxName" -caname "$pfxCaname" - elif [ "$pfxName" ]; then - ${ACME_OPENSSL_BIN:-openssl} pkcs12 -export -out "$_cpfx" -inkey "$_ckey" -in "$_ccert" -certfile "$_cca" -password "pass:$pfxPassword" -name "$pfxName" + ${ACME_OPENSSL_BIN:-openssl} pkcs12 -export -out "$_cpfx" -inkey "$_ckey" -in "$_ccert" -certfile "$_cca" -password "pass:$pfxPassword" -name "$pfxAlias" -caname "$pfxCaname" + elif [ "$pfxAlias" ]; then + ${ACME_OPENSSL_BIN:-openssl} pkcs12 -export -out "$_cpfx" -inkey "$_ckey" -in "$_ccert" -certfile "$_cca" -password "pass:$pfxPassword" -name "$pfxAlias" elif [ "$pfxPassword" ]; then ${ACME_OPENSSL_BIN:-openssl} pkcs12 -export -out "$_cpfx" -inkey "$_ckey" -in "$_ccert" -certfile "$_cca" -password "pass:$pfxPassword" else @@ -1211,17 +1211,17 @@ _toPkcs() { toPkcs() { domain="$1" pfxPassword="$2" - pfxName="$3" if [ -z "$domain" ]; then - _usage "Usage: $PROJECT_ENTRY --toPkcs -d domain [--password pfx-password] [--name pfx-name/pfx-alias]" + _usage "Usage: $PROJECT_ENTRY --toPkcs -d domain [--password pfx-password] [--pfx-alias pfx-alias]" return 1 fi - _isEcc="$4" + _isEcc="$3" + pfxAlias="$4" _initpath "$domain" "$_isEcc" - _toPkcs "$CERT_PFX_PATH" "$CERT_KEY_PATH" "$CERT_PATH" "$CA_CERT_PATH" "$pfxPassword" "$pfxName" + _toPkcs "$CERT_PFX_PATH" "$CERT_KEY_PATH" "$CERT_PATH" "$CA_CERT_PATH" "$pfxPassword" "$pfxAlias" if [ "$?" = "0" ]; then _info "Success, Pfx is exported to: $CERT_PFX_PATH" @@ -5470,7 +5470,7 @@ _process() { _fullchain_file="" _reloadcmd="" _password="" - _name="1" + _pfx_alias="1" _accountconf="" _useragent="" _accountemail="" @@ -5748,8 +5748,8 @@ _process() { _password="$2" shift ;; - --name) - _name="$2" + --pfx-alias) + _pfx_alias="$2" shift ;; --accountconf) @@ -6022,7 +6022,7 @@ _process() { uninstallcronjob) uninstallcronjob ;; cron) cron ;; toPkcs) - toPkcs "$_domain" "$_password" "$_name" "$_ecc" + toPkcs "$_domain" "$_password" "$_ecc" "$_pfx_alias" ;; toPkcs8) toPkcs8 "$_domain" "$_ecc"