From 655ab5bb2630de12dcfdd797d454e967521244e9 Mon Sep 17 00:00:00 2001 From: Pierre-Olivier Mercier Date: Sat, 16 May 2026 13:07:32 +0800 Subject: [PATCH] checker: move hasPKIXUsage from report.go to rule.go --- checker/report.go | 11 ----------- checker/rule.go | 11 +++++++++++ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/checker/report.go b/checker/report.go index b0e035d..b909fe3 100644 --- a/checker/report.go +++ b/checker/report.go @@ -164,17 +164,6 @@ func sevRank(s string) int { } } -// hasPKIXUsage reports whether any TLSA record at this target demands PKIX -// validation (usage 0 or 1). -func hasPKIXUsage(t TargetResult) bool { - for _, r := range t.Records { - if r.Usage == UsagePKIXTA || r.Usage == UsagePKIXEE { - return true - } - } - return false -} - // proposedTLSA renders a ready-to-paste replacement RR computed from the // live chain. The (usage, selector, matching) triplet is taken from the // user's first existing record so the suggestion stays consistent with diff --git a/checker/rule.go b/checker/rule.go index c4d63a4..7586974 100644 --- a/checker/rule.go +++ b/checker/rule.go @@ -269,6 +269,17 @@ func indexProbes(related []sdk.RelatedObservation) map[string]*tls.TLSProbe { return out } +// hasPKIXUsage reports whether any TLSA record at this target demands PKIX +// validation (usage 0 or 1). +func hasPKIXUsage(t TargetResult) bool { + for _, r := range t.Records { + if r.Usage == UsagePKIXTA || r.Usage == UsagePKIXEE { + return true + } + } + return false +} + func truncHex(s string) string { if len(s) > 12 { return s[:12] + "…"