plugin/dnssec: interface type correction for periodicClean sig validity check (#4608)

Signed-off-by: Keith C <keith@fraudmarc.com>
This commit is contained in:
Keith Coleman
2021-05-06 04:33:16 -04:00
committed by GitHub
parent 8487111871
commit 611500b7d4

View File

@@ -33,9 +33,10 @@ func periodicClean(c *cache.Cache, stop <-chan struct{}) {
// the signature
is75 := time.Now().UTC().Add(sixDays)
c.Walk(func(items map[uint64]interface{}, key uint64) bool {
sig := items[key].(*dns.RRSIG)
if !sig.ValidityPeriod(is75) {
delete(items, key)
for _, rr := range items[key].([]dns.RR) {
if !rr.(*dns.RRSIG).ValidityPeriod(is75) {
delete(items, key)
}
}
return true
})