remove verify script, dump.c already does that
authorJohannes Berg <johannes@sipsolutions.net>
Thu, 22 May 2008 20:09:56 +0000 (22:09 +0200)
committerJohannes Berg <johannes@sipsolutions.net>
Thu, 22 May 2008 20:09:56 +0000 (22:09 +0200)
Makefile
scripts/verify.sh [deleted file]

index 75d5e47..23564bc 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-all:   regulatory.bin verify
+all:   regulatory.bin
 
 
 regulatory.bin:        regulatory.sqlite dbgen.py key.priv.pem
@@ -14,9 +14,6 @@ regulatory.sqlite: db/*.sql
                sed 's/AUTO_INCREMENT/AUTOINCREMENT/; s/use regulatory;//' < $$i | sqlite3 regulatory.sqlite ;\
        done
 
-verify:        regulatory.sqlite scripts/verify.sh key.pub.pem
-       @./scripts/verify.sh
-
 generate_keys:
        openssl genrsa -out key.priv.pem 2048
        openssl rsa -in key.priv.pem -pubout -out key.pub.pem
diff --git a/scripts/verify.sh b/scripts/verify.sh
deleted file mode 100755 (executable)
index 985ac6c..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/bash
-
-set -e
-
-echo -n 'Verifying database signature: '
-
-if ! which openssl >/dev/null ; then
-       echo "OpenSSL not installed, cannot verify"
-       exit 0
-fi
-
-DBFILE=regulatory.bin
-
-flen=$(stat -c '%s' regulatory.bin)
-siglen=$(dd if=regulatory.bin bs=1 count=4 skip=16 2>/dev/null |hexdump -e '"0x%08x"')
-siglen=$((siglen))
-tmp=$(mktemp)
-tmpdata=$(mktemp)
-dd if="$DBFILE" of="$tmp" bs=1 count=$siglen skip=$((flen - siglen)) 2>/dev/null
-dd if="$DBFILE" of="$tmpdata" bs=1 count=$((flen - siglen)) 2>/dev/null
-openssl dgst -sha1 -verify key.pub.pem -signature "$tmp" "$tmpdata"
-exit=$?
-rm -f "$tmp" "$tmpdata"