added SSL/TLS support