Skip to content

Dodaios is an open-source agent OS for your desktop: it runs your coding agents, browser and apps by voice or chat, on your own machine. Formerly Personal Jarvis.

fix(install): decode the Fulcio cert portably so macOS verification passes (#473)

Ruben Lütkea94705534a26
diff --git a/install/install-verify.sh b/install/install-verify.sh
index aded0db488..dafd60e4a8 100755
--- a/install/install-verify.sh
+++ b/install/install-verify.sh
@@ -597,7 +597,16 @@ fi
PEM_FOR_OPENSSL="$PEM"
if ! head -c 11 "$PEM" | grep -q '^-----BEGIN'; then
PEM_FOR_OPENSSL="$STAGING/install.sh.pem.decoded"
- if ! base64 -d "$PEM" > "$PEM_FOR_OPENSSL" 2>/dev/null; then
+ # Decode from stdin: GNU base64 takes a file operand, but the macOS
+ # base64 does not, and older macOS spells the flag -D instead of
+ # --decode. The cert blob may also be line-wrapped, so drop line breaks.
+ if base64 --decode </dev/null >/dev/null 2>&1; then
+ B64_DECODE="base64 --decode"
+ else
+ B64_DECODE="base64 -D"
+ fi
+ if ! tr -d '\r\n' < "$PEM" | $B64_DECODE > "$PEM_FOR_OPENSSL" 2>/dev/null \
+ || ! head -c 11 "$PEM_FOR_OPENSSL" | grep -q '^-----BEGIN'; then
err " Fulcio cert is neither raw PEM nor base64-of-PEM — refusing."
exit 1
fi