add support for SSL/tlsOptions

Implement functionality discussed in issue 22