OPENSSL-VERIFY(1ossl)

πŸ’… openssl-verify β€” certificate verification command πŸ’…

okay bestie, so this is the openssl-verify page from the OpenSSL manual set (OPENSSL-VERIFY(1ossl)), and honestly? it's giving "the most important command you've never read the docs for." let's get into it 🫢


✨ SYNOPSIS ✨

openssl verify [-help] [-CRLfile filename|uri] [-crl_download]
[-show_chain] [-verbose] [-trusted filename|uri] [-untrusted
filename|uri] [-vfyopt nm:v] [-nameopt option] [-CAfile file]
[-no-CAfile] [-CApath dir] [-no-CApath] [-CAstore uri] [-no-CAstore]
[-engine id] [-allow_proxy_certs] [-attime timestamp] [-no_check_time]
[-check_ss_sig] [-crl_check] [-crl_check_all] [-explicit_policy]
[-extended_crl] [-ignore_critical] [-inhibit_any] [-inhibit_map]
[-partial_chain] [-policy arg] [-policy_check] [-policy_print] [-purpose
purpose] [-suiteB_128] [-suiteB_128_only] [-suiteB_192] [-trusted_first]
[-no_alt_chains] [-use_deltas] [-auth_level num] [-verify_depth num]
[-verify_email email] [-verify_hostname hostname] [-verify_ip ip]
[-verify_name name] [-x509_strict] [-issuer_checks] [-provider name]
[-provider-path path] [-provparam [name:]key=value] [-propquery propq]
[--] [certificate ...]

look at all those flags. she's got range. 🌈


🌸 DESCRIPTION 🌸

so what does this actually do? it verifies certificate chains. that's the whole vibe. you hand it a cert, it checks whether the whole trust chain holds up. πŸ”₯

and here's the sweet part: if a certificate chain has multiple problems, this program attempts to display all of them. it's not gonna make you fix one thing, re-run, fix another thing, re-run β€” no ma'am, it dumps the whole list at once. main character energy honestly. πŸ‘‘


πŸ’– OPTIONS πŸ’–

  • -help β€” prints out a usage message. the classic "wait what were the flags again" move. πŸ™ˆ
  • -CRLfile filename|uri β€” the file or URI should contain one or more CRLs in PEM or DER format. you can pass this option more than once to pull in CRLs from multiple sources β€” stack 'em, bestie. πŸŽ€
  • -crl_download β€” attempt to download CRL information for certificates via their CDP entries. it goes and fetches. πŸ’…
  • -show_chain β€” displays info about the certificate chain that has been built (if successful). any certificates in the chain that came from the untrusted list get flagged as "untrusted". so you can literally see who's trustworthy and who's not. vibe check, but for certs. ⭐
  • -verbose β€” prints extra information about the operations being performed. she's chatty. we love her. πŸ—£οΈ
  • -trusted filename|uri β€” a file or URI of (more or less) trusted certificates. see openssl-verification-options(1) for more info on trust settings. can be specified more than once to load certs from multiple sources. 🫢
  • -untrusted filename|uri β€” a file or URI of untrusted certificates, used for chain building. also can be specified more than once to load from multiple sources. (yes you can have both. it's a whole ecosystem.) πŸ¦‹
  • -vfyopt nm:v β€” passes options to the signature algorithm during verify operations. the names and values of these options are algorithm-specific β€” iykyk. πŸ”‘
  • -nameopt option β€” specifies how the subject or issuer names get displayed. see openssl-namedisplay-options(1) for the deets. ✨
  • -engine id β€” see "Engine Options" in openssl(1).
⚠️ this option is deprecated. deprecated, babe, it's deprecated. πŸ’€

to load certificates or CRLs that require engine support, specify the -engine option before any of the -trusted, -untrusted or -CRLfile options. order matters, no cap.

  • -CAfile file, -no-CAfile, -CApath dir, -no-CApath, -CAstore uri, -no-CAstore β€” see "Trusted Certificate Options" in openssl-verification-options(1) for details. all the CA-adjacent options live together, cute. 🏠
  • -allow_proxy_certs, -attime, -no_check_time, -check_ss_sig, -crl_check, -crl_check_all, -explicit_policy, -extended_crl, -ignore_critical, -inhibit_any, -inhibit_map, -no_alt_chains, -partial_chain, -policy, -policy_check, -policy_print, -purpose, -suiteB_128, -suiteB_128_only, -suiteB_192, -trusted_first, -use_deltas, -auth_level, -verify_depth, -verify_email, -verify_hostname, -verify_ip, -verify_name, -x509_strict -issuer_checks β€” these all set various options of certificate chain verification. see "Verification Options" in openssl-verification-options(1) for details. yes, that's a lot. yes, they're all listed. we don't skip options in this house. πŸ’ͺ
  • -provider name, -provider-path path, -provparam [name:]key=value, -propquery propq β€” see "Provider Options" in openssl(1), provider(7), and property(7). the provider girlies know. 🌸
  • -- β€” indicates the last option. all arguments following this get assumed to be certificate files. this is super useful if your first certificate filename begins with a - β€” because otherwise the parser would be like "is this a flag???" and get confused. πŸ™ˆ
  • certificate ... β€” one or more target certificates to verify, one per file. if you give it no certificates, this command will attempt to read a single certificate from standard input. stdin said "i'll do it." πŸŽ€
🚨 important heads up bestie: the first parameter that does not begin with a - ends the list of options and starts the list of certificates. so if you place any options after a certificate filename, they will not be interpreted as options β€” they'll be interpreted as certificates. it's not a bug, it's just how she reads. don't let it happen to you. 😭

🩺 DIAGNOSTICS 🩺

ngl, when a verify operation fails the output messages can be somewhat cryptic. the general form of the error message is:

server.pem: /C=AU/ST=Queensland/O=CryptSoft Pty Ltd/CN=Test CA (1024 bit)
error 24 at 1 depth lookup:invalid CA certificate

so let's decode her, line by line: πŸ”

  1. the first line contains the name of the certificate being verified, followed by the subject name of the certificate.
  2. the second line contains the error number and the depth.
  3. the depth is the number of the certificate being verified when a problem was detected, starting with zero for the target ("leaf") certificate itself, then 1 for the CA that signed the target certificate, and so on. so depth 0 = the cert you're checking, depth 1 = her signer, and it goes up from there. πŸͺœ
  4. finally, a textual version of the error number gets presented. so you're not just staring at 24 like πŸ‘οΈπŸ‘„πŸ‘οΈ

a list of the error codes and messages can be found in X509_STORE_CTX_get_error(3); the full list is defined in the header file <openssl/x509_vfy.h>.

and one more thing β€” this command ignores many errors, in order to allow all the problems with a certificate chain to be determined. she's collecting receipts, not stopping at the first one. πŸ’…


πŸ‘€ SEE ALSO πŸ‘€

openssl-verification-options(1), openssl-x509(1), ossl_store-file(7)


πŸ¦‹ HISTORY πŸ¦‹

  • the -show_chain option was added in OpenSSL 1.1.0.
  • the -engine option was deprecated in OpenSSL 3.0.

Copyright 2000-2026 The OpenSSL Project Authors. All Rights Reserved.

Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at <https://www.openssl.org/source/license.html>.


and that's the whole page, bestie! πŸŽ€ this was OpenSSL 3.5.9, dated 2026-09-29 β€” go verify something iconic. periodt. πŸ’œβœ¨

πŸ“¦ where this page comes from