diff --git a/acme.sh b/acme.sh index 20f446aa..415eb246 100755 --- a/acme.sh +++ b/acme.sh @@ -1211,16 +1211,17 @@ _toPkcs() { toPkcs() { domain="$1" pfxPassword="$2" + pfxName="$3" if [ -z "$domain" ]; then - _usage "Usage: $PROJECT_ENTRY --toPkcs -d domain [--password pfx-password]" + _usage "Usage: $PROJECT_ENTRY --toPkcs -d domain [--password pfx-password] [--name pfx-name/pfx-alias]" return 1 fi - _isEcc="$3" + _isEcc="$4" _initpath "$domain" "$_isEcc" - _toPkcs "$CERT_PFX_PATH" "$CERT_KEY_PATH" "$CERT_PATH" "$CA_CERT_PATH" "$pfxPassword" + _toPkcs "$CERT_PFX_PATH" "$CERT_KEY_PATH" "$CERT_PATH" "$CA_CERT_PATH" "$pfxPassword" "$pfxName" if [ "$?" = "0" ]; then _info "Success, Pfx is exported to: $CERT_PFX_PATH" @@ -5469,6 +5470,7 @@ _process() { _fullchain_file="" _reloadcmd="" _password="" + _name="1" _accountconf="" _useragent="" _accountemail="" @@ -5746,6 +5748,10 @@ _process() { _password="$2" shift ;; + --name) + _name="$2" + shift + ;; --accountconf) _accountconf="$2" ACCOUNT_CONF_PATH="$_accountconf" @@ -6016,7 +6022,7 @@ _process() { uninstallcronjob) uninstallcronjob ;; cron) cron ;; toPkcs) - toPkcs "$_domain" "$_password" "$_ecc" + toPkcs "$_domain" "$_password" "$_name" "$_ecc" ;; toPkcs8) toPkcs8 "$_domain" "$_ecc"