From: Mathias Bartmann <mathias.bartmann@gmail.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH proxmox-acme 2/3] acme: add missing _url_replace function
Date: Fri, 25 Sep 2026 14:47:36 +0200 [thread overview]
Message-ID: <20260925124737.42866-3-mathias.bartmann@gmail.com> (raw)
In-Reply-To: <20260925124737.42866-1-mathias.bartmann@gmail.com>
dns_yc.sh (Yandex Cloud) pipes the header and payload of the JWT it
signs through _url_replace to turn base64 into base64url, but the
proxmox-acme shim does not define that helper. Add it as in upstream
acme.sh.
Signed-off-by: Mathias Bartmann <mathias.bartmann@gmail.com>
---
src/proxmox-acme | 4 ++++
src/test/test-shim-helpers | 3 +++
2 files changed, 7 insertions(+)
diff --git a/src/proxmox-acme b/src/proxmox-acme
index 00f4c06..7d776ce 100644
--- a/src/proxmox-acme
+++ b/src/proxmox-acme
@@ -28,6 +28,10 @@ _mktemp() {
mktemp
}
+_url_replace() {
+ tr '/+' '_-' | tr -d '= '
+}
+
# Usage: hashalg [outputhex]
# Output Base64-encoded digest
_digest() {
diff --git a/src/test/test-shim-helpers b/src/test/test-shim-helpers
index b625a53..d4ec5a3 100755
--- a/src/test/test-shim-helpers
+++ b/src/test/test-shim-helpers
@@ -30,5 +30,8 @@ else
fail "_mktemp does not create a writable temporary file"
fi
+[ "$(printf '%s' 'ab/c+d==' | $SHIM _url_replace)" = 'ab_c-d' ] ||
+ fail "_url_replace does not convert base64 to base64url"
+
[ "$FAILED" -eq 0 ] || exit 1
echo "OK: proxmox-acme helpers behave like upstream acme.sh."
--
2.55.0
next prev parent reply other threads:[~2026-09-28 7:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-25 12:47 [PATCH proxmox-acme 0/3] acme: fix missing/diverging shim helpers, tighten missing-function check Mathias Bartmann
2026-09-25 12:47 ` [PATCH proxmox-acme 1/3] fix #7851: acme: add missing _mktemp and restore _dbase64 default Mathias Bartmann
2026-09-25 12:47 ` Mathias Bartmann [this message]
2026-09-25 12:47 ` [PATCH proxmox-acme 3/3] tests: rewrite check-missing-functions to catch calls in substitutions Mathias Bartmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260925124737.42866-3-mathias.bartmann@gmail.com \
--to=mathias.bartmann@gmail.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.