Y509(1) User Commands Y509(1) NAME y509 - inspect and validate X.509 certificate chains SYNOPSIS y509 [OPTIONS] [FILE | HOST:PORT] y509 validate [OPTIONS] [TARGET...] y509 export [OPTIONS] [INDEX] [FORMAT] [FILENAME] y509 inventory [OPTIONS] [TARGET...] y509 diff A B y509 completion SHELL y509 version DESCRIPTION y509 opens a certificate chain in a terminal UI. The chain can come from a PEM, DER PKCS#7 or PKCS#12 file, from a Kubernetes TLS secret as kubectl get secret -o json prints it, from standard input, or from a live server, including one behind STARTTLS. Containers are recognised by their shape rather than their filename, so a pipe works the same as a path. An argument that names an existing file is always read as a file. Anything else is treated as an address; pass --connect to force that reading. The interactive handshake deliberately verifies nothing, because a chain that fails to verify is usually the reason you came. Certificates are listed in the order the server sent them, which is not necessarily a valid chain. y509 validate is the entry point that verifies. COMMANDS validate Verify the chain against the system trust store and exit non-zero on anything a TLS client would reject. Several targets may be given, each a file or a live server; all are checked before anything exits, and with --json one target produces a single object while several produce {"targets": [...]}.Reportsseparatelyonhowthechainwas served -- a missing intermediate, a redundant root, certificates sent out of order, duplicates and strangers in the bundle -- because a chain can verify in a browser and still be rejected by curl, Go or Java, which do not chase the AIA URL to fetch a missing intermediate. export Write a certificate to a file. FORMAT is pem, der, crt or cert; crt and cert are written as PEM. Defaults to the first certificate, pem, and a generated filename. The chain is read from --connect, -i or standard input like every other subcommand; the positional arguments choose what to write, not where to read from. With --all the whole chain is written to one PEM bundle and the first positional argument is the filename. inventory List what algorithm, key size and lifetime each target is using. Nothing is verified against a trust store and the command exits 0 for anything it could read: this answers what is deployed, not whether it is acceptable. --csv and --json write it for a spread- sheet or a script. diff Compare two chains as they were presented. Each argument is a file or a live server. Certificates are matched by the SHA-256 of their DER rather than by subject, because a renewed certificate keeps its name and changes everything else. Exits 0 when the chains are iden- tical and 1 when they differ, following diff(1). completion Write a shell completion script for bash, zsh, fish or powershell to standard output. version Print the version, and the commit and build date when the binary was stamped with them. OPTIONS These apply to every command. --connect HOST[:PORT] Fetch the chain from a live server rather than a file. -i, --input FILE Read certificates from FILE instead of standard input. --servername NAME SNI server name to send. Defaults to the host being connected to. --starttls PROTOCOL Upgrade a plaintext protocol before the handshake. One of smtp, lmtp, imap, nntp, ftp, ldap, mysql or postgres. mariadb and post- gresql are accepted as aliases. --timeout DURATION Timeout for a live connection. Default 10s. --json Print the chain as JSON on standard output instead of opening the terminal UI. The output carries no trust verdict, because nothing was verified; use y509 validate --json for that. Root command only. --password-file FILE Read the password for a PKCS#12 input from FILE, with any trailing newline stripped. Without it the password comes from Y509_PKCS12_PASSWORD or from a prompt on the terminal. There is de- liberately no --password flag: a flag value is visible in ps to every user on the host. --log-file PATH Write the log to PATH. Without it the log goes to the default desti- nation described under FILES, and if that cannot be created, nowhere. --debug Enable debug logging. -h, --help Show help and exit. -v, --version Show version information and exit. VALIDATE OPTIONS --host NAME Also check that the leaf is valid for NAME. --roots FILE PEM file of additional trust anchors. --no-system-roots Do not trust the system store; use only the anchors given by --roots. --json Emit the result as JSON on standard output instead of the text re- port. The text report is replaced rather than added to, and the failure message goes to standard error, so the stream parses even when the check fails. EXIT STATUS y509 validate exits 0 when the chain verifies against the trust anchors, and 1 when it does not: either self-anchored, meaning it links up but ter- minates at a root that is not trusted, or broken, meaning it does not link up at all. The exit status is unchanged by --json. KEY BINDINGS |^/k, |v/j Move through the certificate list, or scroll the details pane. <-/h, ->/l Focus the list or the details pane. tab Cycle the detail tabs. / Search by common name, organisation, DNS name or issuer. f Filter by expired, expiring, valid or self-signed. v Validate the chain. r Redial the server and replace the chain with what it serves now. Only bound when the chain came from a live connection; a failed re- dial leaves the previous chain on screen. e Export the selected certificate. y Copy the selected certificate as PEM to the terminal clipboard (OSC 52). esc Clear the filter, or close a popup. ? Show the full key binding help. q, Ctrl-C Quit. FILES .y509.yaml Configuration, searched for in the home directory and the working directory. It sets the colour theme and the number of days before expiry at which a certificate is flagged as expiring. ~/.cache/y509/y509.log Default log destination, in a directory created with mode 0700. The exact location follows the platform user cache directory. When it cannot be created, y509 logs nowhere rather than failing. EXAMPLES Open a chain from a file: y509 chain.pem Open the chain a server presents: y509 example.com:443 Inspect a chain behind STARTTLS: y509 smtp.example.com:587 --starttls smtp Read from a pipe: openssl s_client -connect example.com:443 -showcerts | y509 Gate CI on a chain that verifies: y509 validate example.com:443 Fail the build on a chain that verifies but is mis-served: y509 validate example.com:443 --json | jq -e '.presentation.ok' Verify against an internal CA: y509 validate chain.pem --roots internal-ca.pem AUTHOR Written by kanywst. REPORTING BUGS Report bugs at https://github.com/kanywst/y509/issues. Report suspected vulnerabilities privately through GitHub Security Advi- sories rather than a public issue. See the security policy at https://github.com/kanywst/y509/security/policy. COPYRIGHT Copyright (C) 2025 y509. Licensed under the Apache License, Version 2.0. y509 manual 2026-09-03 Y509(1)
NAME | SYNOPSIS | DESCRIPTION | COMMANDS | OPTIONS | VALIDATE OPTIONS | EXIT STATUS | KEY BINDINGS | FILES | EXAMPLES | AUTHOR | REPORTING BUGS | COPYRIGHT
Want to link to this manual page? Use this URL:
<https://man.FreeBSD.org/cgi/man.cgi?query=y509&sektion=1&manpath=FreeBSD+Ports+15.1.quarterly>