This is a text-only version of the following page on https://raymii.org: --- Title : OpenSSL get entire certificate chain from a domain or loop over entire chain in file Author : Remy van Elst Date : 16-07-2024 18:30 URL : https://raymii.org/s/snippets/OpenSSL_get_entire_certificate_chain_from_a_domain_or_use_all_certs_in_a_file.html Format : Markdown/HTML --- The `openssl x509` command can be used to get information from a certificate. If you supply a filename, the command will only use the topmost certificate in the file, not all certificates in the file, like in the case of a certificate chain. The `openssl s_client -connect` command can connect to a server and show all certificates served by that server. The command I'm providing in this snippet splits up all certificates found in a file or as the result of `openssl s_client` and allows `openssl x509` to loop over each one individually.
Recently I removed all Google Ads from this site due to their invasive tracking, as well as Google Analytics. Please, if you found this content useful, consider a small donation using any of the options below. It means the world to me if you show your appreciation and you'll help pay the server costs:
GitHub Sponsorship
PCBWay referral link (You get $5, I get $20 after you've placed an order)
Digital Ocea referral link ($200 credit for 60 days. Spend $25 after your credit expires and I'll get $25!)