OPENSSL-VERIFY(1ossl)

πŸ“¦
version 15.1 Β· 2 versions
, in freebsd 15.1

πŸ’… OPENSSL-VERIFY πŸ’…

okay bestie, welcome to the openssl-verify page from the OpenSSL manual set (that's the 1ossl part, iykyk) β€” this is the certificate verification command and she is lowkey iconic πŸŽ€


πŸ¦‹ 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 ...]

✨ DESCRIPTION ✨

So this command verifies certificate chains, periodt. πŸ’… If a chain has multiple problems, the program lowkey tries to show you all of them instead of just the first one it trips over β€” she's thorough like that 🫢


πŸ’– OPTIONS πŸ’–

  • -help β€” prints out a usage message. the classic "what do I even do" button πŸ™ˆ
  • -CRLfile filename|uri β€” this file or URI should hold one or more CRLs in PEM or DER format. you can pass this option more than once to pull CRLs in from multiple sources ✨
  • -crl_download β€” attempts to download CRL info for certificates through their CDP entries 🌐
  • -show_chain β€” shows you info about the certificate chain that got built (if it worked). any certs in the chain that came from the untrusted list get flagged as "untrusted" πŸ‘€
  • -verbose β€” prints extra info about what's being done. she's chatty, we love her πŸ’¬
  • -trusted filename|uri β€” a file or URI of (more or less) trusted certificates. for the full tea on trust settings, see openssl-verification-options(1).

you can specify this option more than once to load certs from multiple sources πŸŽ€

  • -untrusted filename|uri β€” a file or URI of untrusted certificates, used for chain building. and yes β€” this option can also be given more than once to load certs from multiple sources 🧚
  • -vfyopt nm:v β€” passes options to the signature algorithm during verify operations. the names and values of these options are algorithm-specific, so it's very much iykyk territory πŸ”₯
  • -nameopt option β€” sets how the subject or issuer names get displayed. details live in openssl-namedisplay-options(1) πŸ’œ
  • -engine id β€” see "Engine Options" in openssl(1). this option is deprecated ⚠️

if you need to load certificates or CRLs that require engine support, put the -engine option before any of the -trusted, -untrusted or -CRLfile options. order matters, bestie 🫢

  • -CAfile file, -no-CAfile, -CApath dir, -no-CApath, -CAstore uri, -no-CAstore β€” see "Trusted Certificate Options" in openssl-verification-options(1) for the details πŸ’«
  • -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 the full rundown πŸ‘‘
  • -provider name, -provider-path path, -provparam [name:]key=value, -propquery propq β€” see "Provider Options" in openssl(1), plus provider(7) and property(7) 🌈
  • -- β€” marks the last option. everything after this is assumed to be certificate files. super useful when your first certificate filename starts with a - πŸ’€
  • certificate ... β€” one or more target certificates to verify, one per file. if you give it no certificates at all, this command tries to read a single certificate from standard input πŸ“
⚠️ heads up: the first parameter that doesn't start with a - ends the list of options and starts the list of certificates. if you stick any options after a certificate filename, they don't get read as options β€” they get read as certificates. no cap, that's the rule πŸ₯²

πŸ” DIAGNOSTICS πŸ”

when a verify operation fails, the output messages can be, um, somewhat cryptic 😭 the general shape 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, breaking it down: the first line has the name of the certificate being verified followed by the subject name of the certificate. the second line has the error number and the depth. the depth is the number of the certificate being verified when the problem was detected β€” starting at zero for the target ("leaf") certificate itself, then 1 for the CA that signed the target certificate, and so on. finally, a textual version of the error number shows up at the end 🌸

a list of the error codes and messages lives in X509_STORE_CTX_get_error(3); the full list is defined in the header file <openssl/x509_vfy.h> πŸ‘€

and fun fact: this command ignores many errors, specifically so it can figure out all the problems with a certificate chain. not me being nosy on purpose πŸ’…


🫢 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>.


okay that's the whole page, ily, go verify something and slay πŸ’– this was OpenSSL 3.5.6, dated 2026-04-07 β€” mwah, see u in the group chat πŸ¦‹πŸ’…

πŸ“¦ where this page comes from