Last updated on December 27, 2023
With GnuTLS, we can view the certificate details of a website with the following commands (replace "example.com" with the website of your interest):
gnutls-cli --print-cert example.com < /dev/null | certtool --certificate-info
In the command above, gnutls-cli --print-cert example.com < /dev/null
prints the certificate of the website in PEM format to the standard output. Its output is then sent as the standard input to certtool --certificate-info
, which prints information on the given certificate.