resolver: handle different zone signer #38
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #26.
When nameservers host both a parent and child zone, bns doesn't realize the zone cut and doesn't verify signatures correctly, leading to an Invalid RRSIGs error.
This PR identifies such cases by comparing RRSIGs (as suggested here, thanks @buffrr) and switching to that zone before verifying any answer.
The original domain in the issue
sebastian.rasor
no longer has a signed zone, so these 2 examples can be used to review/test:e.xp
- all domains stay within handshakehenry.kelder
- ICANN domain ns for a handshake namesub.test.htools.work
- complete chain without any handshake namesThe tests haven't been updated in a long time and will likely fail just like the main branch, but I've compared it to the (almost) fixed tests from #36 and no extra cases fail. Of course, this still needs proper review.
shameless plug of sitecheck to help visualize these dnssec chains: https://sitecheck.htools.work/check/e.xp / https://sitecheck.htools.work/check/henry.kelder
dig.js output for e.xp
dig.js output for henry.kelder