Skip to content

Commit

Permalink
fix: revoltchat#122 - remove base64 padding for vapid keys
Browse files Browse the repository at this point in the history
./generate_config.sh was not stripping base64 padding (=) which would lead to pushd crashing
  • Loading branch information
hakt0r authored Jan 28, 2025
1 parent 835e245 commit 2169e40
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions generate_config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ echo "january = \"https://$1/january\"" >> Revolt.toml
echo "" >> Revolt.toml
echo "[pushd.vapid]" >> Revolt.toml
openssl ecparam -name prime256v1 -genkey -noout -out vapid_private.pem
echo "private_key = \"$(base64 -i vapid_private.pem | tr -d '\n')\"" >> Revolt.toml
echo "public_key = \"$(openssl ec -in vapid_private.pem -outform DER|tail -c 65|base64|tr '/+' '_-'|tr -d '\n')\"" >> Revolt.toml
echo "private_key = \"$(base64 -i vapid_private.pem | tr -d '\n' | tr -d '=')\"" >> Revolt.toml
echo "public_key = \"$(openssl ec -in vapid_private.pem -outform DER|tail -c 65|base64|tr '/+' '_-'|tr -d '\n'|tr -d '=')\"" >> Revolt.toml
rm vapid_private.pem

# encryption key for files
Expand Down

0 comments on commit 2169e40

Please sign in to comment.