Some days ago i wanted to do a check of a certificate of an ip address. No big deal - so i did:
schroff@zerberus:~$ openssl s_client -showcerts -connect 188.8.131.52.87:443
lib:../crypto/bio/b_addr.c:726:Name or service not known
So i opened google to find a solution.
But on google i found nothing really helpful.
The answer was very easy:
If i read the command line carfully, i would have detected my error:
THE IP ADDRESS WAS INVALID
I wrote an ipv4 with 5 numbers and not with 4...
After using a correct ipv4 number the command worked like expected:
schroff@zerberus:~$ openssl s_client -showcerts -connect 184.108.40.206:443 #
Can't use SSL_get_servername
depth=2 C = US, O = DigiCert Inc, OU = www.digicert.com, CN = DigiCert Global Root CA
depth=1 C = US, O = DigiCert Inc, OU = www.digicert.com, CN = GeoTrust RSA CA 2018
depth=0 C = DE, ST = Rheinland-Pfalz, L = Montabaur, O = 1&1 Mail & Media GmbH, CN = gmx.net