From 751f1159831bb0645e019b1fc5581f4cb1e9d9b4 Mon Sep 17 00:00:00 2001 From: Nick White Date: Thu, 16 Jun 2011 01:29:43 +0100 Subject: Basic firefox update support, minor css update --- gecko/genpub.sh | 11 +++++++++++ gecko/gensig.sh | 22 ++++++++++++++++++++++ gecko/install.ttl | 4 +++- gecko/updates.ttl | 20 ++++++++++++++++++++ 4 files changed, 56 insertions(+), 1 deletion(-) create mode 100755 gecko/genpub.sh create mode 100755 gecko/gensig.sh create mode 100644 gecko/updates.ttl (limited to 'gecko') 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' diff --git a/gecko/gensig.sh b/gecko/gensig.sh new file mode 100755 index 0000000..13c0447 --- /dev/null +++ b/gecko/gensig.sh @@ -0,0 +1,22 @@ +#!/bin/sh +# +# Currently not working - using uhura instead. + +if test $# -ne 2; then + echo "Usage: $0 update.rdf pem" + echo "Outputs a signature suitable for use in update.rdf" + exit 1 +fi + +# serialise all but the signature entry +# in mccoy this is serializeResource(), in mexumgen it's ser() +# exerything else seems to rewrite things, but we *might* get away with sed-ing away the bad line and outputting as rdfxml +# sha512 hash +# sign the hash +# der encode & base64 + +sed '/em:signature/d' < "$1" | rapper -i turtle -o rdfxml /dev/stdin 2>/dev/null \ +| sha512sum \ +| openssl sha1 -sha1 -binary -sign "$2" \ +| openssl enc -e -a 2>/dev/null \ +| awk '{printf("%s", $0)}' | sed 's/\//\\\//g' diff --git a/gecko/install.ttl b/gecko/install.ttl index 655f3d6..dc40853 100644 --- a/gecko/install.ttl +++ b/gecko/install.ttl @@ -13,5 +13,7 @@ em:name "SimplyRead"; em:description "Stop browsing, start reading. Press Ctrl-Alt-r or click the 'sr' icon in the status bar to toggle SimplyRead."; em:creator "Nick White"; - em:homepageUrl "http://njw.me.uk/software/simplyread/"; + em:homepageURL "http://njw.me.uk/software/simplyread/"; + em:updateURL "http://njw.me.uk/software/simplyread/gecko-updates.rdf"; + em:updateKey "PUBKEY"; . diff --git a/gecko/updates.ttl b/gecko/updates.ttl new file mode 100644 index 0000000..34325db --- /dev/null +++ b/gecko/updates.ttl @@ -0,0 +1,20 @@ +# currently not used as uhura is generating it. + +@prefix rdf: . +@prefix em: . + + + em:signature "SIG"; + em:updates [ a rdf:Seq ; + rdf:li <:VERSION>; + ]. + +<:VERSION> + em:version "VERSION"; + em:targetApplication [ + em:id "{ec8030f7-c20a-464f-9b0e-13a3a9e97384}"; + em:minVersion "3.0"; + em:maxVersion "4.0.*"; + em:updateLink "http://njw.me.uk/simplyread/simplyread-VERSION.xpi"; + em:updateHash "sha1:HASH"; + ]. -- cgit v1.2.3