Simplified sample TLS code