From: Dennis Værum <6872940+dvaerum@users.noreply.github.com> Date: Wed, 25 Jan 2023 17:06:49 +0000 (+0100) Subject: The DS digest_type field is now made a DSDigest instance by the constructor (#890) X-Git-Tag: v2.4.0rc1~64 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5a99b9a633373eda80f0ac71194af2c458168152;p=thirdparty%2Fdnspython.git The DS digest_type field is now made a DSDigest instance by the constructor (#890) 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 --- 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]: