Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Acme.Sh
Commits
af193291
Commit
af193291
authored
Feb 06, 2022
by
neilpang
Browse files
Update acme.sh
fix
https://github.com/acmesh-official/acme.sh/issues/3127#issuecomment-1030742187
parent
b39df5ce
Changes
1
Hide whitespace changes
Inline
Side-by-side
acme.sh
View file @
af193291
...
@@ -1141,13 +1141,19 @@ _createkey() {
...
@@ -1141,13 +1141,19 @@ _createkey() {
_debug "Use length $length"
_debug "Use length $length"
if ! touch "$f" >/dev/null 2>&1; then
if ! [ -e "$f" ]; then
_f_path="$(dirname "$f")"
if ! touch "$f" >/dev/null 2>&1; then
_debug _f_path "$_f_path"
_f_path="$(dirname "$f")"
if ! mkdir -p "$_f_path"; then
_debug _f_path "$_f_path"
_err "Can not create path: $_f_path"
if ! mkdir -p "$_f_path"; then
_err "Can not create path: $_f_path"
return 1
fi
fi
if ! touch "$f" >/dev/null 2>&1; then
return 1
return 1
fi
fi
chmod 600 "$f"
fi
fi
if _isEccKey "$length"; then
if _isEccKey "$length"; then
...
@@ -1495,7 +1501,6 @@ _create_account_key() {
...
@@ -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() {
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment