From d0c486c1c4de8e30d87290c070bfe071563e3311 Mon Sep 17 00:00:00 2001 From: Bob Halley Date: Sun, 17 Oct 2010 15:58:19 +0100 Subject: [PATCH] Fix bugs in pre-hashlib compatibility code --- ChangeLog | 5 +++-- dns/tsig.py | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) 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) -- 2.47.3