Browse Source

added option to set alias for PKCS12

pull/1289/head
eddyhub 7 years ago
parent
commit
c09db82b6f
  1. 14
      acme.sh

14
acme.sh

@ -1211,16 +1211,17 @@ _toPkcs() {
toPkcs() { toPkcs() {
domain="$1" domain="$1"
pfxPassword="$2" pfxPassword="$2"
pfxName="$3"
if [ -z "$domain" ]; then 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 return 1
fi fi
_isEcc="$3"
_isEcc="$4"
_initpath "$domain" "$_isEcc" _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 if [ "$?" = "0" ]; then
_info "Success, Pfx is exported to: $CERT_PFX_PATH" _info "Success, Pfx is exported to: $CERT_PFX_PATH"
@ -5469,6 +5470,7 @@ _process() {
_fullchain_file="" _fullchain_file=""
_reloadcmd="" _reloadcmd=""
_password="" _password=""
_name="1"
_accountconf="" _accountconf=""
_useragent="" _useragent=""
_accountemail="" _accountemail=""
@ -5746,6 +5748,10 @@ _process() {
_password="$2" _password="$2"
shift shift
;; ;;
--name)
_name="$2"
shift
;;
--accountconf) --accountconf)
_accountconf="$2" _accountconf="$2"
ACCOUNT_CONF_PATH="$_accountconf" ACCOUNT_CONF_PATH="$_accountconf"
@ -6016,7 +6022,7 @@ _process() {
uninstallcronjob) uninstallcronjob ;; uninstallcronjob) uninstallcronjob ;;
cron) cron ;; cron) cron ;;
toPkcs) toPkcs)
toPkcs "$_domain" "$_password" "$_ecc"
toPkcs "$_domain" "$_password" "$_name" "$_ecc"
;; ;;
toPkcs8) toPkcs8)
toPkcs8 "$_domain" "$_ecc" toPkcs8 "$_domain" "$_ecc"

Loading…
Cancel
Save