webserver_certchain.py is a Python script designed to retrieve and display the certificate chain of a specified web server. The script leverages OpenSSL to extract certificate details such as subject, issuer, expiration date (notAfter), and Subject Alternative Names (SANs).
- Extracts and displays information from a web server's certificate chain:
- Subject
- Issuer
- Expiration Date (
notAfter) - Subject Alternative Names (
subjectAlternativeName)
- Python 3.x
- OpenSSL installed and accessible in your system's PATH
- Ensure you have Python installed on your system.
- Ensure OpenSSL is available in your system's PATH.
- Download the script or clone the repository.
The script can be run directly via the command line. The basic syntax is:
python webserver_certchain.py <website_fqdn> [webserver_ip|webserver_fqdn] [port]