y509 <target> --json prints the chain without a trust verdict:
y509 chain.pem --json | jq '.chain[0].otherNames'validate --json prints the full result to stdout and nothing else. Errors go to stderr, so the output always parses. Exit codes are unchanged.
y509 validate example.com:443 --json | jq .{ "host": "example.com", "trust": { "level": "self-anchored", "trusted": false, "anchor": "Internal Root CA", "error": "x509: certificate signed by unknown authority" }, "presentation": { "ok": false, "findings": [ { "problem": "missing issuer", "subject": "*.example.com", "detail": "the chain stops at a certificate that is not a CA; its issuer \"YR2\" was never sent, so a client that does not chase AIA (curl, Go, Java) cannot build a chain", "fetchUrls": ["http://yr2.i.lencr.org/"] } ] }, "chain": [{ "index": 0, "commonName": "*.example.com", "daysUntilExpiry": 43, "…": "…" }], "connection": { "tlsVersion": "TLS 1.3", "cipherSuite": "TLS_AES_128_GCM_SHA256", "ocspStapled": true, "ocspStaple": { "status": "good", "serialNumber": "03d8…", "producedAt": "2026-09-14T09:00:00Z", "thisUpdate": "2026-09-14T09:00:00Z", "nextUpdate": "2026-09-21T08:59:59Z", "expired": false, "verified": true } }, "conformance": { "ok": true, "findings": [] }, "revocation": { "ok": true, "findings": [] }, "advisories": []}chainis in the order presented, not sorted.levelandproblemare strings;findingsis always an array, nevernull.connectionexists only for a live server, not a file or stdin.ocspStapleis what the server stapled. Nothing is fetched. No staple is not a finding.verified: falseon its own means the issuer was not in the chain. WithverifyError, the issuer was there and the response did not verify.- No
nextUpdatemeans the responder gave none: do not cache it. - If the staple was unreadable,
ocspStapleErrorreplacesocspStaple. Only one of the two is ever present.
revocationjudges that staple, with its ownoksopresentation.okkeeps its meaning. Present alongsideconnection, and for files too with--check-crl.problemis one ofrevoked,stale staple,staple not yet valid,unknown status,staple signature invalid,unreadable staple, and with--check-crlrevoked in CRL,stale CRL,CRL signature invalid,CRL out of scope,CRL unavailable.crlis present only with--check-crl: one{subject, url, status, cached, thisUpdate, nextUpdate, revokedAt, revocationReason, error}per certificate checked,statusbeinggood,revokedorunchecked(witherror). Empty when the chain is not trusted, since a CRL signature needs a trusted issuer to check against.- A signature left unchecked because the issuer was not sent is not a finding here. That is
missing issuerunderpresentation.
conformancechecks each certificate against rules clients enforce on their own, with its ownok. Present for files too.problemis one ofweak signature(SHA-1 or MD5, except a genuine SHA-1 self-signature, which no client checks),weak key(RSA under 2048 bits),no SAN(a server certificate with a common name but no DNS, IP or URI SAN),precertificate(a CT precertificate was served),unhandled critical extension(a critical extension Go does not process),insufficient SCTs(below Chrome's CT policy).insufficient SCTscounts only SCTs whose signature verifies against the log's bundled key, as Chrome does. It is judged byvalidateonly, for a chain trusted through the system store that carries at least one SCT, embedded or sent in the TLS handshake. A certificate with none is not judged, because an enterprise root in the system store looks the same as a public one. Nor is one that falls short only by SCTs from logs the bundled list does not know, which could close the gap, or any chain once that list is more than 70 days old, which is when Chrome stops enforcing CT too. A scheduled workflow refreshes the list twice a month.conformance.ctPolicysays how that went:met,not met, ornot judged: <reason>, including why for a chain CT does not apply to, such as one trusted through--roots.conformance.okis not affected by a check that was not judged, so a gate that must not pass an unjudged chain readsctPolicy(the Action exposes it asct-policy).
advisoriesare notes on missing pointers, judged without verifying anything. They have nookand fail no gate. Present for files too.problemisno AIA(no CA Issuers URL) orno CRL pointer(neither a CRL distribution point nor an OCSP URL, on a certificate that is not short-lived). A missing OCSP URL alone is never reported. Self-signed certificates are skipped.
policyis present only with--policy, as{name, ok, findings}.problemisunapproved signatureorunapproved key.chain[].noExpiryis true for the RFC 52809999-12-31sentinel, a certificate with no well-defined expiration.daysUntilExpiryandvalidityDaysstill carry the real arithmetic, so readnoExpirybefore printing them.chain[].sctslists the embedded SCTs as{logId, log, operator, logState, timestamp}, with logs named from a bundled copy of Google's CT log list (make ct-logsrefreshes it). Nothing is verified or fetched.log,operatorandlogStateare absent for a log the list does not know. If the list is damaged,sctErrorsays why andsctskeeps what was read before the damage.chain[].extensionslists every extension as{oid, name, critical}.nameis absent for one y509 does not know.chain[].keyUsageandchain[].extKeyUsagename the usages as RFC 5280 does (digitalSignature,serverAuth). An extended key usage y509 does not know is its OID. Absent when the certificate has none.chain[].basicConstraintsis{ca, pathLen}.pathLenis absent when there is no limit and0when the CA may not issue further CAs. The whole object is absent when the certificate has no basic constraints extension.chain[].subjectKeyIdandchain[].authorityKeyIdare lowercase hex. A certificate'sauthorityKeyIdmatches its issuer'ssubjectKeyId.chain[].caIssuers,chain[].ocspServersandchain[].crlDistributionPointsare the AIA, OCSP and CRL URLs the certificate carries. Nothing is fetched.chain[].idnslists the internationalized names among the common name anddnsNamesas{ascii, unicode}. For a name that fails IDNA validation, only the spelling the certificate carries is present anderrorsays why. Absent when there are none.
The exit code alone cannot tell self-anchored from broken, or say anything about how the chain was served. JSON can:
# Fail the build on a chain that verifies but is mis-served.y509 validate example.com:443 --json | jq -e '.presentation.ok'
# Warn 30 days out, without parsing prose.y509 validate example.com:443 --json | jq '.chain[0].daysUntilExpiry < 30'
# Fail on a SHA-1 signature, a short RSA key, or a CN-only certificate.y509 validate example.com:443 --json | jq -e '.conformance.ok'
# Fail on anything a FIPS-mode client would reject.y509 validate example.com:443 --policy fips --json | jq -e '.policy.ok'
# Fail on any signature or key that is not post-quantum.y509 validate example.com:443 --policy pqc --json | jq -e '.policy.ok'
# Fail on a revoked or stale stapled OCSP response.y509 validate example.com:443 --json | jq -e '.revocation.ok'
# Find anything still negotiating below TLS 1.2.y509 validate example.com:443 --json | jq -e '.connection.tlsVersion | test("1\\.[23]$")'© 2026 The y509 Authors. Licensed under Apache-2.0. Part of dyokto.