Added support for TLS