Skip to content

[dnssec] Add DaneVerifier.daneVerify() returning DaneVerificationResult - #158

Merged
Flowdalic merged 1 commit into
MiniDNS:masterfrom
Flowdalic:dane-verify
Oct 18, 2026
Merged

Flowdalic merged 1 commit into
MiniDNS:masterfrom
Flowdalic:dane-verify

Conversation

@Flowdalic

Copy link
Copy Markdown
Collaborator

DaneVerifier.verifyCertificateChain() returned false if the TLSA response was not DNSSEC authenticated, if there were no usable TLSA records, and if a PKIX-EE (1) TLSA record matched the certificate. Hence callers were unable to tell whether DANE did not apply or whether the DANE verification was successful but PKIX validation is still required.

The new daneVerify() methods return a DaneVerificationResult, which distinguishes between those cases. The existing boolean methods are now implemented on top of daneVerify().

Furthermore, a matching PKIX-EE TLSA record is now considered a match when deciding whether to throw a certificate mismatch exception. Previously, a TLSA RRset with a matching PKIX-EE record and a non-matching DANE-EE record resulted in a
MultipleCertificateMismatchExceptions being thrown.

Fixes #136.

@Flowdalic

Copy link
Copy Markdown
Collaborator Author

@singpolyma would that work for you?

DaneVerifier.verifyCertificateChain() returned false if the TLSA
response was not DNSSEC authenticated, if there were no usable TLSA
records, and if a PKIX-EE (1) TLSA record matched the certificate.
Hence callers were unable to tell whether DANE did not apply or whether
the DANE verification was successful but PKIX validation is still
required.

The new daneVerify() methods return a DaneVerificationResult, which
distinguishes between those cases. The existing boolean methods are
now implemented on top of daneVerify().

Furthermore, a matching PKIX-EE TLSA record is now considered a match
when deciding whether to throw a certificate mismatch exception.
Previously, a TLSA RRset with a matching PKIX-EE record and a
non-matching DANE-EE record resulted in a
MultipleCertificateMismatchExceptions being thrown.

Fixes MiniDNS#136.
@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 39125938518

Coverage increased (+1.4%) to 62.415%

Details

  • Coverage increased (+1.4%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • 37 coverage regressions across 1 file.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

37 previously-covered lines in 1 file lost coverage.

File Lines Losing Coverage Coverage
org/minidns/dane/DaneVerifier.java 37 54.25%

Coverage Stats

Coverage Status
Relevant Lines: 4791
Covered Lines: 3150
Line Coverage: 65.75%
Relevant Branches: 1802
Covered Branches: 965
Branch Coverage: 53.55%
Branches in Coverage %: Yes
Coverage Strength: 2.94 hits per line

💛 - Coveralls

@Flowdalic
Flowdalic merged commit b8bc3d2 into MiniDNS:master Oct 18, 2026
3 checks passed
@Flowdalic
Flowdalic deleted the dane-verify branch October 18, 2026 12:46
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.

No way to tell if DANE part passed or not for cert usage 1

2 participants