openssl s client -showcerts

From wikieduonline
Jump to navigation Jump to search

openssl s_client -showcerts -connect YOUR_DOMAIN.COM:443
openssl s_client -showcerts -connect google.coom:443
openssl s_client -showcerts 


self signed certificate

openssl s_client -showcerts -connect google.com:443 
CONNECTED(00000006)
depth=0 OU = "No SNI provided; please fix your client.", CN = invalid2.invalid
verify error:num=18:self signed certificate
verify return:1 

depth=0 OU = "No SNI provided; please fix your client.", CN = invalid2.invalid verify return:1 write W BLOCK --- Certificate chain

0 s:/OU=No SNI provided; please fix your client./CN=invalid2.invalid
  i:/OU=No SNI provided; please fix your client./CN=invalid2.invalid

BEGIN CERTIFICATE-----

MIIDfDCCAmSgAwIBAgIJAJB2iRjpM5OgMA0GCSqGSIb3DQEBCwUAME4xMTAvBgNV

Errors

openssl s_client -showcerts -connect google.com
40D741D72F7F0000:error:8000006F:system library:BIO_connect:Connection refused:../crypto/bio/bio_sock2.c:114:calling connect()
40D741D72F7F0000:error:10000067:BIO routines:BIO_connect:connect error:../crypto/bio/bio_sock2.c:116:connect:errno=111
openssl s_client -showcerts  https://google.com
40B78119DD7F0000:error:10080002:BIO routines:BIO_lookup_ex:system lib:../crypto/bio/bio_addr.c:738:Servname not supported for ai_socktype connect:errno=0

See also

Advertising: