all: regulatory.bin verify
-regulatory.bin: regulatory.sqlite dbgen.py
+regulatory.bin: regulatory.sqlite dbgen.py key.priv.pem
@./dbgen.py
clean:
sed 's/AUTO_INCREMENT/AUTOINCREMENT/; s/use regulatory;//' < $$i | sqlite3 regulatory.sqlite ;\
done
-verify: regulatory.sqlite verify.sh
+verify: regulatory.sqlite verify.sh key.pub.pem
@./verify.sh
# struct regdb_file_reg_country
output.write(struct.pack('>ccxxI', str(alpha2[0]), str(alpha2[1]), reg_rules_collections[reg_collection_id]))
-key = RSA.load_key('test-key.priv.pem')
+key = RSA.load_key('key.priv.pem')
hash = sha.new()
hash.update(output.getvalue())
sig = key.sign(hash.digest())
tmpdata=$(mktemp)
dd if="$DBFILE" of="$tmp" bs=1 count=128 skip=$((flen - 128)) 2>/dev/null
dd if="$DBFILE" of="$tmpdata" bs=1 count=$((flen - 128)) 2>/dev/null
-openssl dgst -sha1 -verify test-key.pub.pem -signature "$tmp" "$tmpdata"
+openssl dgst -sha1 -verify key.pub.pem -signature "$tmp" "$tmpdata"
rm -f "$tmp"
rm -f "$tmpdata"