From 0147a2152b0d302f200a8d3666c15e7648811e1a Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Mon, 3 Apr 2023 00:15:27 +0200 Subject: [PATCH] Let Brave create extension key --- scripts/Common/Config/Chromium/install-extension.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/Common/Config/Chromium/install-extension.sh b/scripts/Common/Config/Chromium/install-extension.sh index f7ed8c12..c201ff58 100755 --- a/scripts/Common/Config/Chromium/install-extension.sh +++ b/scripts/Common/Config/Chromium/install-extension.sh @@ -20,6 +20,8 @@ else destination="$EXTENSION_DIR/$EXTENSION_NAME.crx"; + sudo -u "$1" brave-browser --pack-extension="$extensionDir" --pack-extension-key="$keyFile"; + # Tamper manifest file manifest="$(cat "$manifestFile" | jq ". + {key: "'"'"$(openssl rsa -in "$keyFile" -pubout -outform DER | openssl base64 -A)"'"'"}")"; echo "$manifest" | sudo -u "$1" tee "$manifestFile";