Saturday, February 23, 2013

3 steps to HTTPS on Ubuntu

Got it from https://help.ubuntu.com/10.04/serverguide/httpd.html


1. sudo a2enmod ssl
2. sudo a2ensite default-ssl
3. sudo /etc/init.d/apache2 restart

SSL clinent/server using openssl

Telnet is nice program that allows us to create a TCP socket connection with a server and then interact with the server on the terminal. This ofcourse does not work when the server uses SSL. That is where openssl comes to the rescue.

openssl s_client -connect imap.gmail.com:993


Similarly an SSL server can be cooked up instantaneously -

openssl genrsa 1024 > key
openssl req -new -x509 -nodes -sha1 -days 365 -key key > cert
openssl s_server -accept 12345 -cert cert -key key