Added real support for TLS