fix: strip new lines from private key

This commit is contained in:
Paul Makles
2024-10-27 21:47:02 +00:00
parent 2a70f45c97
commit 68bb3c43c7

View File

@@ -15,8 +15,9 @@ echo "january = \"https://$1/january\"" >> Revolt.toml
echo "" >> Revolt.toml
echo "[api.vapid]" >> Revolt.toml
openssl ecparam -name prime256v1 -genkey -noout -out vapid_private.pem
echo "private_key = \"$(base64 vapid_private.pem)\"" >> Revolt.toml
echo "private_key = \"$(base64 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
rm vapid_private.pem
# encryption key for files
echo "" >> Revolt.toml