Mock implementation of TLS