summaryrefslogtreecommitdiff
path: root/gecko/genpub.sh
blob: 12768dda345fa6fec2c46f84572f69d4da922c1e (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/sh

if test $# -ne 1; then
	echo "Usage: $0 pem"
	echo "Outputs a public key suitable for use in install.rdf"
	exit 1
fi

openssl rsa -pubout -outform DER < "$1" 2>/dev/null \
| openssl enc -e -a 2>/dev/null \
| awk '{printf("%s", $0)}' | sed 's/\//\\\//g'