NLnetLabs / domain

A DNS library for Rust.
https://nlnetlabs.nl/projects/domain/about/
BSD 3-Clause "New" or "Revised" License
332 stars 56 forks source link

Remove incorrect compose_len from ProtoRrsig #313

Closed achow101 closed 2 months ago

achow101 commented 2 months ago

ProtoRrsig is used to produce the data that is signed. According to https://datatracker.ietf.org/doc/html/rfc4034#autoid-23, this serialization begins with the first rdata field which is type_covered, however ProtoRrsig is inserting a length at the beginning. As such, signatures produced by SortedRecords::sign() are invalid. Fix this by removing that length from the serialization.

partim commented 2 months ago

Thank you for the PR! Looks like we lost a fix at some point as I’m sure this was all working.

Before we can merge the PR, could you perchance merge main into your branch just so that the CI is happy?

achow101 commented 2 months ago

Rebased