summaryrefslogtreecommitdiff
path: root/dns
diff options
context:
space:
mode:
authorBob Halley <halley@dnspython.org>2013-08-26 09:14:51 -0700
committerBob Halley <halley@dnspython.org>2013-08-26 09:14:51 -0700
commite25ee875d9d5b6f1cd4cd06e4127c1fbfa557bef (patch)
tree2631f7b187e010bb5a23b5bb86382f1501c5941f /dns
parent7e1e49cb7dd044bbe0cf3722e358d856643b7c65 (diff)
downloaddnspython-e25ee875d9d5b6f1cd4cd06e4127c1fbfa557bef.tar.gz
Make multi-message TSIGs compute correctly for algorithms other than MD5
Diffstat (limited to 'dns')
-rw-r--r--dns/tsig.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/dns/tsig.py b/dns/tsig.py
index 603f039..6d801d4 100644
--- a/dns/tsig.py
+++ b/dns/tsig.py
@@ -111,7 +111,7 @@ def sign(wire, keyname, secret, time, fudge, original_id, error,
mpack = struct.pack('!H', len(mac))
tsig_rdata = pre_mac + mpack + mac + id + post_mac
if multi:
- ctx = hmac.new(secret)
+ ctx = hmac.new(secret, digestmod=digestmod)
ml = len(mac)
ctx.update(struct.pack('!H', ml))
ctx.update(mac)