]> git.ipfire.org Git - thirdparty/dnspython.git/commitdiff
Merge pull request #531 from bwelling/tsig2
authorBob Halley <halley@dnspython.org>
Wed, 8 Jul 2020 00:29:35 +0000 (17:29 -0700)
committerGitHub <noreply@github.com>
Wed, 8 Jul 2020 00:29:35 +0000 (17:29 -0700)
Split TSIG sign and validate.

1  2 
dns/tsig.py
tests/test_tsig.py

diff --cc dns/tsig.py
index b554e2e76af2775173f7e4a9745c42c76d924ce4,3273813795ec8e6267310715a486b43c63bfe7ac..8f34fe67326179567a394903442bb430da9410a9
@@@ -91,12 -90,16 +91,11 @@@ _hashes = 
  
  default_algorithm = HMAC_SHA256
  
 -BADSIG = 16
 -BADKEY = 17
 -BADTIME = 18
 -BADTRUNC = 22
 -
  
- def sign(wire, key, rdata, time=None, request_mac=None, ctx=None, multi=False):
-     """Return a (tsig_rdata, mac, ctx) tuple containing the HMAC TSIG rdata
-     for the input parameters, the HMAC MAC calculated by applying the
-     TSIG signature algorithm, and the TSIG digest context.
-     @rtype: (string, hmac.HMAC object)
+ def _digest(wire, key, rdata, time=None, request_mac=None, ctx=None,
+             multi=None):
+     """Return a context containing the TSIG rdata for the input parameters
+     @rtype: hmac.HMAC object
      @raises ValueError: I{other_data} is too long
      @raises NotImplementedError: I{algorithm} is not supported
      """
Simple merge