diff options
author | Nick White <git@njw.me.uk> | 2011-06-16 01:29:43 +0100 |
---|---|---|
committer | Nick White <git@njw.me.uk> | 2011-06-16 01:29:43 +0100 |
commit | 751f1159831bb0645e019b1fc5581f4cb1e9d9b4 (patch) | |
tree | 4a325361f69ebf6ac51fedca21e432e901e222b9 /gecko/gensig.sh | |
parent | 335cebf3653b037e43c3e9f28a31696f0b7f1813 (diff) |
Basic firefox update support, minor css update
Diffstat (limited to 'gecko/gensig.sh')
-rwxr-xr-x | gecko/gensig.sh | 22 |
1 files changed, 22 insertions, 0 deletions
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' |