Added support for TLS secured connections.