From a423e6974a2f4981f620b25fda82af9301d55678 Mon Sep 17 00:00:00 2001 From: David Blacka Date: Thu, 2 Jul 2020 18:57:17 +0000 Subject: [PATCH] Issue #3. Fix direct wildcard match Notice if our wildcard expansion gives us back the same name we started with. --- src/com/verisign/tat/dnssec/ValUtils.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/com/verisign/tat/dnssec/ValUtils.java b/src/com/verisign/tat/dnssec/ValUtils.java index 1df585f..4b8d1cf 100644 --- a/src/com/verisign/tat/dnssec/ValUtils.java +++ b/src/com/verisign/tat/dnssec/ValUtils.java @@ -424,7 +424,13 @@ public class ValUtils { int label_diff = (rrset.getName().labels() - 1) - rrsig.getLabels(); if (label_diff > 0) { - return rrset.getName().wild(label_diff); + Name wc = rrset.getName().wild(label_diff); + // if the name was the wildcard itself, this isn't actually a + // wildcard expansion. + if (wc.equals(rrset.getName())) { + return null; + } + return wc; } return null; -- 2.36.6