Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How would you test an SSL connection?

Tags:

I'm experimenting with OpenSSL on my network application and I want to test if the data sent is encrypted and can't be seen by eavesdropper.

What tools can you use to check? Could this be done programmatically so it could be placed in a unit test?

like image 462
MrValdez Avatar asked Sep 29 '08 09:09

MrValdez


People also ask

What is SSL security test?

This free online service performs a deep analysis of the configuration of any SSL web server on the public Internet.

How do I test an SSL certificate in Windows?

To view certificates for the current userSelect Run from the Start menu, and then enter certmgr. msc. The Certificate Manager tool for the current user appears. To view your certificates, under Certificates - Current User in the left pane, expand the directory for the type of certificate you want to view.

How does SSL checker work?

An SSL checker (Secure Sockets Layer checker) is a tool that verifies proper installation of an SSL certificate on a Web server. Multiple SSL certificate vendors offer Web-based tools to check the validity of an SSL certificate for a particular domain.


2 Answers

openssl has an s_client, which is a quick and dirty generic client that you can use to test the server connection. It'll show the server certificate and negotiated encryption scheme.

like image 101
Mark Brackett Avatar answered Nov 11 '22 04:11

Mark Brackett


I found this guide very helpful. These are some of the tools that he used:

$ openssl s_client -connect mail.prefetch.net:443 -state -nbio 2>&1 | grep "^SSL"

$ ssldump -a -A -H -i en0

$ ssldump -a -A -H -k rsa.key -i en0

$ ssldump -a -A -H -k rsa.key -i en0 host fred and port 443

like image 44
f01 Avatar answered Nov 11 '22 02:11

f01