Add SSL support
Merge ssl into master