Skip to content
dyoktoPublic

About

TUI for X.509 certificate chains: verifies trust, and catches the missing intermediates and bad ordering that break curl but not browsers

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

42 stars

Watchers

2 watching

Forks

y509

y509

Go Report Card License Built with Bubble Tea

A TUI for X.509 certificate chains. It checks whether a chain verifies, and separately whether it was served correctly: missing intermediates, redundant roots, wrong order. That second check explains "works in the browser, breaks in curl".

Built on the Charm v2 stack: Bubble Tea, Lip Gloss, Bubbles, huh.

y509 Demo

Docs: https://dyokto.github.io/y509/docs/. The quick start runs y509 validate on a chain with a missing intermediate, one sent in the wrong order, and a correct one, offline.

Install

# Homebrew (macOS)
brew install kanywst/tap/y509

# FreeBSD
pkg install y509

# Go 1.27+
go install github.com/dyokto/y509/cmd/y509@latest
# Windows
scoop bucket add kanywst https://github.com/kanywst/scoop-bucket
scoop install kanywst/y509

docs/guide/install.md covers the module path change from kanywst/y509, release binaries and packages, Windows and FreeBSD.

Usage

y509 cert-chain.pem                       # a file (PEM, DER or PKCS#7)
y509 example.com:443                      # a live server
y509 smtp.example.com:587 --starttls smtp # ...behind STARTTLS
cat chain.pem | y509                      # stdin
kubectl get secret tls -o json | y509     # a Kubernetes TLS secret

PKCS#7, PKCS#12 and Kubernetes TLS secrets are detected by content. docs/guide/usage.md has every input, STARTTLS, diff and inventory.

Live servers

An existing file path is read as a file; anything else is an address. The TUI handshake verifies nothing, so a broken chain can still be inspected, in the order the server sent it. See live servers.

Comparing two chains

y509 diff matches certificates by SHA-256 of their DER and exits 1 when the chains differ. See comparing two chains.

Validating from a script

y509 validate exits 0 for a chain that verifies against the trust store (or --roots) and 1 for one that is self-anchored or broken. --policy fips|pqc and --check-crl add checks. See docs/guide/validate.md.

How the chain was served

A chain can verify and still break curl, Go and Java: a missing intermediate, a redundant root, wrong order. y509 reports that from what was actually sent. See how the chain was served.

Will it validate on that client?

y509 paths builds every path from the leaf to the roots of dated trust store snapshots bundled in the binary (curl, certifi, Debian, OpenJDK, Chrome Root Store) and says per store whether the chain validates as sent. See checking other clients' trust stores.

Machine-readable output

validate --json prints the full result to stdout and nothing else; errors go to stderr. presentation, conformance, revocation and policy each carry their own ok. See docs/guide/json.md.

Taking an inventory

y509 inventory lists key, signature and expiry per certificate, as a table, CSV or JSON, without verifying anything. See taking an inventory.

GitHub Actions

- uses: dyokto/y509@v1
  with:
    target: example.com:443
    fail-on: untrusted,mis-served,expiring

Inputs, outputs and a scheduled monitor: docs/guide/github-action.md.

Keybindings

? in the TUI shows them all. The table is in docs/guide/tui.md.

Configuration

~/.y509.yaml sets the expiry warning window and the colours (Catppuccin Mocha by default). See docs/guide/tui.md.

Development

make build       # Build with version info
make test        # Run tests
make lint        # Run golangci-lint
make vulncheck   # Run govulncheck

See ROADMAP.md for plans and non-goals, and CONTRIBUTING.md before sending a patch.

Verifying releases

Releases include a Sigstore-signed checksums.txt, an SPDX SBOM per archive and SLSA build provenance. The cosign and gh attestation commands, for releases before and after the move to dyokto, are in docs/guide/verify-releases.md.

License

Apache License 2.0

About

TUI for X.509 certificate chains: verifies trust, and catches the missing intermediates and bad ordering that break curl but not browsers

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

42 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages