diff options
author | Michael Martin <3277009+flrgh@users.noreply.github.com> | 2022-05-07 13:18:36 -0700 |
---|---|---|
committer | Michael Martin <3277009+flrgh@users.noreply.github.com> | 2022-05-07 13:18:36 -0700 |
commit | bc3842cf5dbd60b1f5800adb31f59133e12d1f8b (patch) | |
tree | f2612e8176a74950aadcd2e4139c6c5bda4e6ef0 /meta/3rd | |
parent | 0accbf03f11c47249bc5b353e306e9703f7089f3 (diff) | |
download | lua-language-server-bc3842cf5dbd60b1f5800adb31f59133e12d1f8b.zip |
annotate new tcpsock:setclientcert() method
Diffstat (limited to 'meta/3rd')
-rw-r--r-- | meta/3rd/OpenResty/library/ngx.lua | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/meta/3rd/OpenResty/library/ngx.lua b/meta/3rd/OpenResty/library/ngx.lua index c1e03bbd..d3cf8c6b 100644 --- a/meta/3rd/OpenResty/library/ngx.lua +++ b/meta/3rd/OpenResty/library/ngx.lua @@ -2920,6 +2920,18 @@ function tcpsock:connect(host, port, opts) end ---@return string? error function tcpsock:sslhandshake(reused_session, server_name, ssl_verify, send_status_req) end +--- Set client certificate chain and corresponding private key to the TCP socket object. +--- +--- The certificate chain and private key provided will be used later by the `tcpsock:sslhandshake` method. +--- +--- If both of `cert` and `pkey` are `nil`, this method will clear any existing client certificate and private key that was previously set on the cosocket object +--- +---@param cert ffi.cdata*|nil # a client certificate chain cdata object that will be used while handshaking with remote server. These objects can be created using ngx.ssl.parse_pem_cert function provided by lua-resty-core. Note that specifying the cert option requires corresponding pkey be provided too. +---@param key ffi.cdata*|nil # a private key corresponds to the cert option above. These objects can be created using ngx.ssl.parse_pem_priv_key function provided by lua-resty-core. +---@return boolean ok +---@return string? error +function tcpsock:setclientcert(cert, key) end + --- Sends data without blocking on the current TCP or Unix Domain Socket connection. --- |