From 5a99b9a633373eda80f0ac71194af2c458168152 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Dennis=20V=C3=A6rum?= <6872940+dvaerum@users.noreply.github.com> Date: Wed, 25 Jan 2023 18:06:49 +0100 Subject: [PATCH] The DS digest_type field is now made a DSDigest instance by the constructor (#890) MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dns/rdtypes/dsbase.py b/dns/rdtypes/dsbase.py index b6032b0f..5a4e8c44 100644 --- a/dns/rdtypes/dsbase.py +++ b/dns/rdtypes/dsbase.py @@ -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]: -- 2.47.3