summaryrefslogtreecommitdiff
path: root/gecko/genpub.sh
diff options
context:
space:
mode:
authorNick White <git@njw.me.uk>2011-06-16 01:29:43 +0100
committerNick White <git@njw.me.uk>2011-06-16 01:29:43 +0100
commit751f1159831bb0645e019b1fc5581f4cb1e9d9b4 (patch)
tree4a325361f69ebf6ac51fedca21e432e901e222b9 /gecko/genpub.sh
parent335cebf3653b037e43c3e9f28a31696f0b7f1813 (diff)
Basic firefox update support, minor css update
Diffstat (limited to 'gecko/genpub.sh')
-rwxr-xr-xgecko/genpub.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/gecko/genpub.sh b/gecko/genpub.sh
new file mode 100755
index 0000000..12768dd
--- /dev/null
+++ b/gecko/genpub.sh
@@ -0,0 +1,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'