Skip to content

Commit

Permalink
fix #844
Browse files Browse the repository at this point in the history
  • Loading branch information
neil committed May 15, 2017
1 parent df037db commit 2844d73
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions acme.sh
Expand Up @@ -1244,17 +1244,20 @@ createDomainKey() {
fi

domain=$1
length=$2
_cdl=$2

if [ -z "$length" ]; then
if [ -z "$_cdl" ]; then
_debug "Use DEFAULT_DOMAIN_KEY_LENGTH=$DEFAULT_DOMAIN_KEY_LENGTH"
length="$DEFAULT_DOMAIN_KEY_LENGTH"
_cdl="$DEFAULT_DOMAIN_KEY_LENGTH"
fi

_initpath "$domain" "$length"
_initpath "$domain" "$_cdl"

if [ ! -f "$CERT_KEY_PATH" ] || ([ "$FORCE" ] && ! [ "$IS_RENEW" ]); then
_createkey "$length" "$CERT_KEY_PATH"
if _createkey "$_cdl" "$CERT_KEY_PATH"; then
_savedomainconf Le_Keylength "$_cdl"
_info "The domain key is here: $(__green $CERT_KEY_PATH)"
fi
else
if [ "$IS_RENEW" ]; then
_info "Domain key exists, skip"
Expand Down

0 comments on commit 2844d73

Please sign in to comment.