Skip to content

Tlsa - #156

Merged
Flowdalic merged 4 commits into
MiniDNS:masterfrom
Flowdalic:tlsa
Oct 19, 2026
Merged

Tlsa#156
Flowdalic merged 4 commits into
MiniDNS:masterfrom
Flowdalic:tlsa

Conversation

@Flowdalic

Copy link
Copy Markdown
Collaborator

No description provided.

@coveralls

coveralls commented Oct 18, 2026 •

Copy link
Copy Markdown

Coverage Report for CI Build 39278252833

Coverage increased (+0.9%) to 63.116%

Details

  • Coverage increased (+0.9%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • 96 coverage regressions across 4 files.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

96 previously-covered lines in 4 files lost coverage.

File Lines Losing Coverage Coverage
org/minidns/dane/DaneVerifier.java 45 62.63%
org/minidns/dnssec/DnssecClient.java 31 86.58%
org/minidns/dnsname/DnsName.java 19 86.39%
org/minidns/dane/DaneCertificateException.java 1 85.0%

Coverage Stats

Coverage Status
Relevant Lines: 4829
Covered Lines: 3200
Line Coverage: 66.27%
Relevant Branches: 1846
Covered Branches: 1013
Branch Coverage: 54.88%
Branches in Coverage %: Yes
Coverage Strength: 2.97 hits per line

💛 - Coveralls

DaneVerifier only considered TLSA RRs whose owner name equals the
queried name. TLSA RRs provisioned via CNAMEs (RFC 6698 § A.2.1) were
therefore ignored, and verifyCertificateChain() silently returned
false, i.e., DANE was not used.

DaneVerifier now de-aliases the queried name using the CNAME RRs of the
authentic response, and queries the CNAME target if the response does
not contain its TLSA RRs. The number of followed CNAMEs is limited to
16, which also guards against CNAME loops.

Fixes MiniDNS#140.
This is the substitution performed for DNAME RRs (RFC 6672 § 2.2) and
will be used to validate DNAME-synthesized CNAME RRs.

Also remove the assertion on the length of the name in
DnsName.toBytes(). If assertions were enabled, then it was triggered
before validateMaxDnsnameLengthInOctets() could throw a
DNSNameTooLongException, which is the intended behavior for too long
names.
The CNAME RRs synthesized from DNAME RRs are not signed. Hence
DnssecClient threw a DnssecValidationFailedException ("Only some
records are signed!") for every answer involving a DNAME RR.

DnssecClient now considers an unsigned CNAME RR as valid if it is
consistent with a validated DNAME RR of the answer, that is, if its
owner name is below the owner name of the DNAME RR and its target is
the result of the DNAME substitution (RFC 6672 § 2.2, § 5.3.1).
If the DNSSEC validation of the TLSA response failed, DaneVerifier
wrapped the DnssecValidationFailedException in a RuntimeException.

RFC 6698 § 4.1 requires that a bogus TLSA response causes the TLS
connection to be aborted. DaneVerifier now throws the new
DaneCertificateException.DnssecValidationFailed, which, for example,
causes DaneExtendedTrustManager to reject the server certificate.
Other IOExceptions, e.g., network errors, are still wrapped in a
RuntimeException.
@Flowdalic
Flowdalic merged commit 2fef968 into MiniDNS:master Oct 19, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants