summaryrefslogtreecommitdiff
path: root/gecko/genpub.sh
diff options
context:
space:
mode:
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'