]> git.ipfire.org Git - thirdparty/dnspython.git/commitdiff
The DS digest_type field is now made a DSDigest instance by the constructor (#890)
authorDennis Værum <6872940+dvaerum@users.noreply.github.com>
Wed, 25 Jan 2023 17:06:49 +0000 (18:06 +0100)
committerGitHub <noreply@github.com>
Wed, 25 Jan 2023 17:06:49 +0000 (09:06 -0800)
Hey @rthalley

I found another place in the code there, you may have gotten "distracted" 😉 as you phrased it in
https://github.com/rthalley/dnspython/issues/888#issuecomment-1402198449

So, I just made a pull request this time

dns/rdtypes/dsbase.py

index b6032b0f8d7001b7dab9734b811fc5b1fb5601e9..5a4e8c44778c728e3dc89d06075432e6136762f3 100644 (file)
@@ -44,7 +44,7 @@ class DSBase(dns.rdata.Rdata):
         super().__init__(rdclass, rdtype)
         self.key_tag = self._as_uint16(key_tag)
         self.algorithm = dns.dnssectypes.Algorithm.make(algorithm)
-        self.digest_type = self._as_uint8(digest_type)
+        self.digest_type = dns.dnssectypes.DSDigest.make(self._as_uint8(digest_type))
         self.digest = self._as_bytes(digest)
         try:
             if len(self.digest) != self._digest_length_by_type[self.digest_type]: