Add SSL support.

These changes add a basic SSL support to the module. Thanks to
https://github.com/charlesdunbar for pairing and assisting with testing
the changes.

These changes are very basic to setup ssl. Let me know what you think.