From e246e07e033a2ea89bab7bae7be75dc20a8724b9 Mon Sep 17 00:00:00 2001 From: s0ph0s Date: Wed, 28 Feb 2024 21:22:46 -0500 Subject: [PATCH] Add crypto.tls.wrap docs --- tool/net/definitions.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tool/net/definitions.lua b/tool/net/definitions.lua index aa9e830de..ead9c3ed2 100644 --- a/tool/net/definitions.lua +++ b/tool/net/definitions.lua @@ -7978,6 +7978,14 @@ function unix.Errno:doc() end --- differs from the System Five error code. function unix.Errno:__tostring() end +--- Wraps a plain TCP client socket connection with TLS encryption. +--- +--- Initiates the connection handshake immediately. +---@param fd integer +---@param hostname string for validating that the hostname on the certificate matches what is expected +---@return crypto.tls.Connection +---@nodiscard +function crypto.tls.wrap(fd, hostname) -- CONSTANTS ---@type integer for debug logging level. See `Log`.