How zarmin/certdiag works
certdiag is a stateless X.509 diagnostic CLI and interactive browser. Users scan files or inspect a live endpoint or capture; the application parses certificates, relates keys and chains, evaluates health and trust, and presents findings. Separate workflows cover trust-store discovery/comparison, packet-capture analysis, and certificate/key creation and conversion. The graph reflects documented capabilities; because most implementation excerpts were not sampled, uncertain internal call links are omitted.
Main entry points: root.go Command router · structured.go Result formatting · create_cert.go Create and renew · list.go Scan command
Components 25
User interfaces
- CLI entry
certdiag_app/main.go - Command router
certdiag_app/cmd/root.go - Interactive browser
certdiag_app/internal/tui/tui.go - Result formatting
certdiag_app/internal/output/structured.go
Certificate diagnostics
- Scan command
certdiag_app/cmd/list.go - File scanning
certdiag_app/internal/certops/scan.go - Certificate parsing
certdiag_app/internal/certlib/reader.go - Health checks
certdiag_app/cmd/check.go - Check rules
certdiag_app/internal/certlib/checker.go
Trust evaluation
- Chain verification
certdiag_app/cmd/verify.go - Verification logic
certdiag_app/internal/certops/verify.go - Trust stores
certdiag_app/internal/certlib/truststore/store.go - Store commands
certdiag_app/cmd/store.go
Certificate operations
- Create and renew
certdiag_app/cmd/create_cert.go - Certificate operations
certdiag_app/internal/certops/certcreate.go - Key generation
certdiag_app/internal/certops/keygen.go - Format conversion
certdiag_app/internal/certops/convert.go
Network and captures
- Remote commands
certdiag_app/cmd/remote.go - Remote operations
certdiag_app/internal/certops/remote_fetch.go - Capture commands
certdiag_app/cmd/pcap.go - Capture analysis
certdiag_app/internal/pcapint/analyze.go
Other components
- User
- Remote endpoints
- Packet capture
- Certificate files
Connections 32
- User → CLI entry: invokes
- CLI entry → Command router: dispatches
- Command router → Scan command: routes
- Command router → Health checks: routes
- Command router → Chain verification: routes
- Command router → Store commands: routes
- Command router → Remote commands: routes
- Command router → Capture commands: routes
- Command router → Create and renew: routes
- Command router → Interactive browser: launches
- Scan command → File scanning: calls
- File scanning → Certificate files: reads
- File scanning → Certificate parsing: parses with
- Scan command → Result formatting: formats
- Health checks → Check rules: runs checks
- Health checks → Result formatting: formats
- Chain verification → Verification logic: calls
- Verification logic → Trust stores: evaluates against
- Chain verification → Result formatting: formats
- Store commands → Trust stores: discovers and compares
- Store commands → Result formatting: formats
- Remote commands → Remote operations: calls
- Remote operations → Remote endpoints: connects to
- Remote commands → Result formatting: formats
- Capture commands → Capture analysis: analyzes
- Capture analysis → Packet capture: reads
- Create and renew → Certificate operations: calls
- Create and renew → Key generation: calls
- Create and renew → Format conversion: calls
- Certificate operations → Certificate files: writes
- Key generation → Certificate files: writes
- Format conversion → Certificate files: writes