Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/advanced-features.md
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ Output includes:
- **Remote IP, resolver provenance, and connection timing** for the selected TCP or QUIC path
- **Certificate chain** with tree visualization and expiry status
- **Subject Alternative Names** (DNS names and IP addresses)
- **Verification result and trust-anchor status**; platform verifiers do not expose the selected trust anchor
- **Verification result and trust-anchor status**; the selected trust anchor may not be reported by the verifier
- **OCSP staple status**; unverified staples are shown neutrally and never claim responder, signature, or freshness validation

Expiry is color-coded: red if expired or less than 7 days remaining, yellow if less than 30 days, green otherwise.
Expand Down
10 changes: 5 additions & 5 deletions internal/tlsinspect/tlsinspect.go
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ func renderVerification(p *core.Printer, cs *tls.ConnectionState, insecure bool)
p.WriteString("skipped (--insecure)")
case len(cs.VerifiedChains) > 0:
p.Set(core.Green)
p.WriteString("verified by the platform verifier")
p.WriteString("verified")
default:
p.Set(core.Yellow)
p.WriteString("not verified")
Expand All @@ -551,10 +551,10 @@ func renderVerification(p *core.Printer, cs *tls.ConnectionState, insecure bool)
if insecure || len(cs.VerifiedChains) == 0 {
p.WriteString("not available")
} else {
// Go exposes the verified chain but not the trust-anchor selected by
// the platform verifier. Never infer that the final peer certificate
// is the anchor.
p.WriteString("details unavailable (platform verifier)")
// The selected trust anchor is local to the verifier and is not
// separately exposed by the TLS connection state. Never infer that the
// final peer certificate is the anchor.
p.WriteString("not reported by verifier")
}
p.WriteString("\n")
}
Expand Down
22 changes: 22 additions & 0 deletions internal/tlsinspect/tlsinspect_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -617,4 +617,26 @@ func TestRender(t *testing.T) {
t.Errorf("expected 'SANs:' in output, got:\n%s", out)
}
})

t.Run("verified ConnectionState", func(t *testing.T) {
cs := &tls.ConnectionState{
VerifiedChains: [][]*x509.Certificate{{
{Subject: pkix.Name{CommonName: "Test Root"}},
}},
}

p := newTestPrinter()
render(p, cs)
out := string(p.Bytes())

if !strings.Contains(out, "Verification: verified") {
t.Errorf("expected successful verification status, got:\n%s", out)
}
if !strings.Contains(out, "Trust anchor: not reported by verifier") {
t.Errorf("expected unavailable trust-anchor status, got:\n%s", out)
}
if strings.Contains(out, "platform verifier") {
t.Errorf("unexpected platform-specific wording in output:\n%s", out)
}
})
}
Loading