This repository has been archived on 2023-05-06. You can view files and clone it, but cannot push or open issues or pull requests.
pleroma-ansible-playbook/Makefile
Dan Anglin b0ddbc30ad
added: configuration for Pleroma
This merge request adds the template file and default variables for
configuring Pleroma.
Also included in this merge request are:

- added: Makefile to produce the secret key base, signing salt and the
public and private keys for web encryption.
- fixed: Pleroma OTP builds are now downloaded from the stable branch.
- changed: removed data from the pleroma task and added them in the
variable directory.
2019-10-15 09:16:24 +01:00

24 lines
868 B
Makefile

VAPID_PRIVATE_KEY_FILE := vapid-private-key.pem
PHONY: secret_key_base signing_salt vapid_private_key vapid_public_key
all: secret_key_base signing_salt vapid_private_key vapid_public_key
secret_key_base:
@echo "Secret key base:"
@openssl rand -base64 48
signing_salt:
@echo -e "\nSigning salt:"
@openssl rand -hex 4
$(VAPID_PRIVATE_KEY_FILE):
@openssl ecparam -genkey -name prime256v1 -out $(VAPID_PRIVATE_KEY_FILE)
vapid_private_key: $(VAPID_PRIVATE_KEY_FILE)
@echo -e "\nVapid private key:"
@openssl ec -in $(VAPID_PRIVATE_KEY_FILE) -outform DER 2> /dev/null | tail -c +8 | head -c 32 | base64 | tr '/+' '_-' | tr -d '=' | tr -d '\n'
vapid_public_key: $(VAPID_PRIVATE_KEY_FILE)
@echo -e "\n\nVapid public key:"
@openssl ec -in $(VAPID_PRIVATE_KEY_FILE) -pubout -outform DER 2> /dev/null | tail -c 65 | base64 | tr '/+' '_-' | tr -d '=' | tr -d '\n'