$ luarocks install org.conman.tls
This module handles TLS via the libtls API. There are several libraries now implementing this API, including LibreSSL (where it was originally developed), OpenSSL and BearSSL.
You are probably better off reading the man pages for the libtls functions as this is straight port of the API.
Versions
Dependencies
lua >= 5.1, <= 5.4