add a minimal TLS implementation