MiniDNS / minidns

DNS library for Android and Java SE
Other
215 stars 61 forks source link

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

Open singpolyma opened 5 months ago

singpolyma commented 5 months ago

https://github.com/MiniDNS/minidns/blob/15a8da3eefa7f49efe4afbe8a50bc22b991dc58b/minidns-dnssec/src/main/java/org/minidns/dane/DaneVerifier.java#L213

So for exmaple for 1 1 1 this checks that the DANE part passes, but then returns false because DANE is necessary but not sufficient in that case. We can know DANE didn't specifically fail because no exception is raised, but if DNSSEC fails entirely also we get a return of false with no exception raised, so there is no way to tell these apart.

Suggestion: return an int code, 0 for fully verified success, 1 for DANE passed but there's more to do, and -1 for no DANE found or checked at all. Something like that.