aboutsummaryrefslogtreecommitdiff
path: root/setup.sh
blob: 727e3adc5f5b3d2d80702cb5d238bd113b1112e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#! /bin/sh

WWWUSER=www

# Download jQuery.
mkdir -p jquery
wget -O jquery/jquery.js http://code.jquery.com/jquery-1.7.2.min.js

# Generate the private key.
openssl genpkey -algorithm rsa -out rsa2048.pem -pkeyopt rsa_keygen_bits:2048

# Install the private key.
mkdir -p /etc/mulkid
mv rsa2048.pem /etc/mulkid/
chmod go=      /etc/mulkid/rsa2048.pem
chown $WWWUSER /etc/mulkid/rsa2048.pem

# Generate spec file.
./generate_specfile.pl >browserid.json
echo "Please put browserid.json where it will be served as"
echo "    https://<whatever>/.well-known/browserid"
echo "with a content type of"
echo "    application/json"
echo "."