diff options
| author | Brian Wellington <bwelling@xbill.org> | 2020-07-01 13:23:57 -0700 |
|---|---|---|
| committer | Brian Wellington <bwelling@xbill.org> | 2020-07-01 13:23:57 -0700 |
| commit | 0703a8e6d132d4c988d5886233e49d3740c0e6a8 (patch) | |
| tree | 9d744d1e7844d7e56705345ba91186bc01f4182f /dns | |
| parent | 8d1360481095e29ce63c9777b37d9eb0c411f9b7 (diff) | |
| download | dnspython-0703a8e6d132d4c988d5886233e49d3740c0e6a8.tar.gz | |
Explicitly use the key's algorithm.
Diffstat (limited to 'dns')
| -rw-r--r-- | dns/tsig.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/dns/tsig.py b/dns/tsig.py index c3c849c..89183cf 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) |
