OpenSSL "s_client -connect" - Connect to HTTPS Web Site

Q

How to connect to a HTTPS Web site using OpenSSL? I see the Web sites using the "https:\" format.

✍: FYIcenter.com

A

If you see a Web sites using the "https:\" format, for example https://twitter.com/login/, you can try to connect the Web site using the "x509 -connect" command as shown below:

C:\Users\fyicenter>\local\openssl\openssl.exe

OpenSSL> s_client -connect www.twitter.com:443 -quiet

depth=1 C = US, O = DigiCert Inc, OU = www.digicert.com, CN = DigiCert
nded Validation Server CA
verify error:num=20:unable to get local issuer certificate

<Ctrl-C>
read:errno=10093

Options used in these commands are:

  • "-connect www.twitter.com:443" - Establish a secure communication connection with server "www.twitter.com" at port # "443". Remember that HTTPS Web site uses the default port # 443.
  • "-quiet" - Do not print too much debugging information while establishing the connection.
  • "<Ctrl-C>" - Send the cancel signal to close the connection

 

OpenSSL "s_client -connect" - View Server Certificate

OpenSSL "s_client" Command Options

OpenSSL "s_client" Command

⇑⇑ OpenSSL Tutorials

2012-07-24, 20765🔥, 0💬