Identificar el certificado SSL con el comando certtool

Con el comando certtool podremos identificar todos los datos de nuestro certificado ssl.

 

Debemos instalar gnutls-bin en Debian, Ubuntu o sus derivados.

sudo apt install gnutls-bin

Ejemplo de salida:
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  libopts25
The following NEW packages will be installed:
  gnutls-bin libopts25
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 250 kB of archives.
After this operation, 990 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://mirrors.linode.com/ubuntu xenial/main amd64 libopts25 amd64 1:5.18.7-3 [57.8 kB]
Get:2 http://mirrors.linode.com/ubuntu xenial-updates/universe amd64 gnutls-bin amd64 3.4.10-4ubuntu1.2 [192 kB]
Fetched 250 kB in 0s (14.3 MB/s)     
Selecting previously unselected package libopts25:amd64.
(Reading database ... 34082 files and directories currently installed.)
Preparing to unpack .../libopts25_1%3a5.18.7-3_amd64.deb ...
Unpacking libopts25:amd64 (1:5.18.7-3) ...
Selecting previously unselected package gnutls-bin.
Preparing to unpack .../gnutls-bin_3.4.10-4ubuntu1.2_amd64.deb ...
Unpacking gnutls-bin (3.4.10-4ubuntu1.2) ...
Processing triggers for libc-bin (2.23-0ubuntu5) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up libopts25:amd64 (1:5.18.7-3) ...
Setting up gnutls-bin (3.4.10-4ubuntu1.2) ...
Processing triggers for libc-bin (2.23-0ubuntu5) ...
..........
........
......

 

Ejecutamos certtool.

certtool -i < tu-archivo.pem

certtool -i < /etc/ssl/sololinux.es.crt | more

Ejemplo de resultado:
X.509 Certificate Information:
	Version: 3
	Serial Number (hex): 03bb567f2ab8cd904f4168e159115389351b
	Issuer: C=US,O=Let's Encrypt,CN=Let's Encrypt Authority X3
	Validity:
		Not Before: Sat Mar 04 23:01:00 UTC 2017
		Not After: Fri Jun 02 23:01:00 UTC 2017
	Subject: CN=www.cyberciti.biz
	Subject Public Key Algorithm: RSA
	Algorithm Security Level: High (4096 bits)
.......................
...............
.........

 

Agregar comentario