Linux: Get Subject Alternative Name (SAN) from SSL Certificate

Objective: Get, dump or display the Subject Alternative Name (SAN) field from SSL certificate.

To print the SAN field from Google’s SSL certificate, use the following command syntax.

Each DNS host in the SAN field will be printed on a separate line. The command uses extended grep and it has only been tested to be working on Linux.

If you would like to print the SAN field from a certificate file, use the following syntax.

The cert.pem is the input certificate file from which the SAN field has to be dumped.

ibrahim = { interested_in(unix, linux, android, open_source, reverse_engineering); coding(c, shell, php, python, java, javascript, nodejs, react); plays_on(xbox, ps4); linux_desktop_user(true); }