mirror of
https://github.com/plantroon/acme.sh.git
synced 2024-12-26 23:11:44 +00:00
Update acme.sh
fix https://github.com/acmesh-official/acme.sh/issues/3127#issuecomment-1030742187
This commit is contained in:
parent
b39df5cef0
commit
af193291fa
10
acme.sh
10
acme.sh
@ -1141,6 +1141,7 @@ _createkey() {
|
|||||||
|
|
||||||
_debug "Use length $length"
|
_debug "Use length $length"
|
||||||
|
|
||||||
|
if ! [ -e "$f" ]; then
|
||||||
if ! touch "$f" >/dev/null 2>&1; then
|
if ! touch "$f" >/dev/null 2>&1; then
|
||||||
_f_path="$(dirname "$f")"
|
_f_path="$(dirname "$f")"
|
||||||
_debug _f_path "$_f_path"
|
_debug _f_path "$_f_path"
|
||||||
@ -1149,6 +1150,11 @@ _createkey() {
|
|||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
if ! touch "$f" >/dev/null 2>&1; then
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
chmod 600 "$f"
|
||||||
|
fi
|
||||||
|
|
||||||
if _isEccKey "$length"; then
|
if _isEccKey "$length"; then
|
||||||
_debug "Using ec name: $eccname"
|
_debug "Using ec name: $eccname"
|
||||||
@ -1495,7 +1501,6 @@ _create_account_key() {
|
|||||||
else
|
else
|
||||||
#generate account key
|
#generate account key
|
||||||
if _createkey "$length" "$ACCOUNT_KEY_PATH"; then
|
if _createkey "$length" "$ACCOUNT_KEY_PATH"; then
|
||||||
chmod 600 "$ACCOUNT_KEY_PATH"
|
|
||||||
_info "Create account key ok."
|
_info "Create account key ok."
|
||||||
return 0
|
return 0
|
||||||
else
|
else
|
||||||
@ -5611,8 +5616,9 @@ _installcert() {
|
|||||||
if [ -f "$_real_key" ]; then
|
if [ -f "$_real_key" ]; then
|
||||||
cat "$CERT_KEY_PATH" >"$_real_key" || return 1
|
cat "$CERT_KEY_PATH" >"$_real_key" || return 1
|
||||||
else
|
else
|
||||||
cat "$CERT_KEY_PATH" >"$_real_key" || return 1
|
touch "$_real_key" || return 1
|
||||||
chmod 600 "$_real_key"
|
chmod 600 "$_real_key"
|
||||||
|
cat "$CERT_KEY_PATH" >"$_real_key" || return 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user