Unable to connect with TLS encryption