diff options
author | Luis R. Rodriguez <lrodriguez@atheros.com> | 2009-07-22 10:57:23 -0700 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-08-05 14:18:57 -0400 |
commit | 784cc1aa62bd32f8afd778a748060f5e059a034c (patch) | |
tree | 74bff08507ac8c3fc427a0d04655044801817911 | |
parent | daf5e1101c6bc2ee8cbceaa3de9227699e37fa6b (diff) | |
download | external_wireless-regdb-784cc1aa62bd32f8afd778a748060f5e059a034c.tar.gz external_wireless-regdb-784cc1aa62bd32f8afd778a748060f5e059a034c.tar.bz2 external_wireless-regdb-784cc1aa62bd32f8afd778a748060f5e059a034c.zip |
wireless-regb: make db2bin.py use new hashlib for sha1master-2009-08-05
Python now complains about sha module as its deprecated:
./db2bin.py regulatory.bin db.txt ~/.wireless-regdb-mcgrof.key.priv.pem
./db2bin.py:5: DeprecationWarning: the sha module is deprecated; use the hashlib module instead
import sha
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rwxr-xr-x | db2bin.py | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -2,7 +2,7 @@ from cStringIO import StringIO import struct -import sha +import hashlib from dbparse import DBParser import sys @@ -127,13 +127,13 @@ if len(sys.argv) > 3: # determine signature length key = RSA.load_key(sys.argv[3]) - hash = sha.new() + hash = hashlib.sha1() hash.update(output.getvalue()) sig = key.sign(hash.digest()) # write it to file siglen.set(len(sig)) # sign again - hash = sha.new() + hash = hashlib.sha1() hash.update(output.getvalue()) sig = key.sign(hash.digest()) |