tls: Add support for listen mode