From: Brian Wellington Date: Wed, 1 Jul 2020 20:23:57 +0000 (-0700) Subject: Explicitly use the key's algorithm. X-Git-Tag: v2.0.0rc2~13^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0703a8e6d132d4c988d5886233e49d3740c0e6a8;p=thirdparty%2Fdnspython.git Explicitly use the key's algorithm. --- diff --git a/dns/tsig.py b/dns/tsig.py index c3c849c7..89183cf0 100644 --- a/dns/tsig.py +++ b/dns/tsig.py @@ -106,7 +106,7 @@ def sign(wire, key, rdata, time=None, request_mac=None, ctx=None, multi=False): """ first = not (ctx and multi) - (algorithm_name, digestmod) = get_algorithm(rdata.algorithm) + (algorithm_name, digestmod) = get_algorithm(key.algorithm) if first: ctx = hmac.new(key.secret, digestmod=digestmod) if request_mac: @@ -139,7 +139,7 @@ def sign(wire, key, rdata, time=None, request_mac=None, ctx=None, multi=False): else: ctx = None tsig = dns.rdtypes.ANY.TSIG.TSIG(dns.rdataclass.ANY, dns.rdatatype.TSIG, - rdata.algorithm, time, rdata.fudge, mac, + key.algorithm, time, rdata.fudge, mac, rdata.original_id, rdata.error, rdata.other)