]> git.ipfire.org Git - thirdparty/dnspython.git/commitdiff
Fix bugs in pre-hashlib compatibility code
authorBob Halley <halley@nominum.com>
Sun, 17 Oct 2010 14:58:19 +0000 (15:58 +0100)
committerBob Halley <halley@nominum.com>
Sun, 17 Oct 2010 14:58:19 +0000 (15:58 +0100)
ChangeLog
dns/tsig.py

index e49a6eeffedadab296afa0252fb16b1b4bc44fc9..ad226d3717b0a72d46c33364142260d56f6c76bc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,8 +1,9 @@
 2010-10-17  Bob Halley  <halley@dnspython.org>
 
-       * 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  <halley@dnspython.org>
+       * dns/dnssec.py: Added key_id() and make_ds().
 
        * dns/message.py: message.py needs to import dns.edns since it uses
          it.
index b4deeca859dcaac594acd4733326c17b64f5a4c7..e6f2e91a54bab53adb7c0d2166e506b842b113d2 100644 (file)
@@ -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)