WIP on tls API