Added SSL/TLS support with self-signed certificates