From: Bob Halley Date: Sun, 17 Oct 2010 14:58:19 +0000 (+0100) Subject: Fix bugs in pre-hashlib compatibility code X-Git-Tag: v1.9.0~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d0c486c1c4de8e30d87290c070bfe071563e3311;p=thirdparty%2Fdnspython.git Fix bugs in pre-hashlib compatibility code --- diff --git a/ChangeLog b/ChangeLog index e49a6eef..ad226d37 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,9 @@ 2010-10-17 Bob Halley - * dns/dnssec.py: Added key_id() and make_ds(). + * dns/tsig.py (get_algorithm): fix hashlib compatibility; thanks to + Kevin Chen for the patch. -2010-10-17 Bob Halley + * dns/dnssec.py: Added key_id() and make_ds(). * dns/message.py: message.py needs to import dns.edns since it uses it. diff --git a/dns/tsig.py b/dns/tsig.py index b4deeca8..e6f2e91a 100644 --- a/dns/tsig.py +++ b/dns/tsig.py @@ -203,8 +203,8 @@ def get_algorithm(algorithm): except ImportError: import md5, sha - hashes[dns.name.from_text('HMAC-MD5.SIG-ALG.REG.INT')] = md5.md5 - hashes[dns.name.from_text('hmac-sha1')] = sha.sha + hashes[dns.name.from_text('HMAC-MD5.SIG-ALG.REG.INT')] = md5 + hashes[dns.name.from_text('hmac-sha1')] = sha if isinstance(algorithm, (str, unicode)): algorithm = dns.name.from_text(algorithm)