Connection failing, how to correctly configure encryption - SSL/TLS?