added codes for SSL/TLS