fix https://github.com/acmesh-official/acme.sh/issues/6246#issuecomment-3610998032
Some checks failed
Shellcheck / shfmt (push) Has been cancelled
DNS / CheckToken (push) Has been cancelled
DNS / Fail (push) Has been cancelled
DNS / Docker (push) Has been cancelled
DNS / MacOS (push) Has been cancelled
DNS / Windows (push) Has been cancelled
DNS / FreeBSD (push) Has been cancelled
DNS / OpenBSD (push) Has been cancelled
DNS / NetBSD (push) Has been cancelled
DNS / DragonFlyBSD (push) Has been cancelled
DNS / Solaris (push) Has been cancelled
DNS / Omnios (push) Has been cancelled
Build DockerHub / CheckToken (push) Has been cancelled
Build DockerHub / build (push) Has been cancelled
Shellcheck / ShellCheck (push) Has been cancelled

This commit is contained in:
neil
2025-12-05 22:31:45 +01:00
parent bee01c938a
commit 45cb36f6d9

View File

@@ -97,9 +97,10 @@ _ali_rest() {
}
_ali_nonce() {
#_head_n 1 </dev/urandom | _digest "sha256" hex | cut -c 1-31
#Not so good...
date +"%s%N" | sed 's/%N//g'
if [ "$ACME_OPENSSL_BIN" ]; then
"$ACME_OPENSSL_BIN" rand -hex 16 2>/dev/null && return 0
fi
printf "%s" "$(date +%s)$$$(date +%N)" | _digest sha256 hex | cut -c 1-32
}
_timestamp() {