This is an example of doing modern TLS1.2 ECDHE handshakes with hostname verification I created the CA and server certificate from information available at http://datacenteroverlords.com/2012/03/01/creating-your-own-ssl-certificate-authority/