Browse Source

Rename parameters...

pull/1289/head
eddyhub 7 years ago
parent
commit
fb7218fce5
  1. 24
      acme.sh

24
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"

Loading…
Cancel
Save