SSL support

Hi. I've done an ssl connection support. Let's merge it to master :)