Port of libtls from LibreSSL to OpenSSL
