From 220366da25017dd4b99f2136c1a35a5efc2d3fd8 Mon Sep 17 00:00:00 2001 From: V1K1NGbg Date: Fri, 2 Aug 2024 14:47:21 +0300 Subject: new dependencies --- src/ssl/https.d.tl | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 src/ssl/https.d.tl (limited to 'src/ssl') diff --git a/src/ssl/https.d.tl b/src/ssl/https.d.tl new file mode 100644 index 00000000..94c38df6 --- /dev/null +++ b/src/ssl/https.d.tl @@ -0,0 +1,50 @@ +local ssl = require("ssl") +local SSLCertificate = ssl.SSLCertificate +local SSLConnection = ssl.SSLConnection + +local ltn12 = require("ltn12") +local Pump = ltn12.Pump +local Sink = ltn12.Sink +local Source = ltn12.Source + +local record https + record HTTPSRequest + -- HTTP options + url: string|{string} + sink: Sink + method: string + headers: {string:string} + source: Source + step: Pump + -- proxy: string -- not supported + -- redirect: boolean -- not supported + -- create: function -- https implements its own + + -- SSL options + mode: string + protocol: string + key: string + password: string|function + certificate: string + certificates: {SSLCertificate} + cafile: string + capath: string + verify: string|{string} + options: string|{string} + ciphers: string + ciphersuites: string + depth: number + dhparam: function + curve: string + curves_list: string + verifyext: string|{string} + alpn: string|function|{string} + dane: boolean + end + request: function(string): string, number, {string:string}, string + request: function(string, string): string, number, {string:string}, string + request: function(HTTPSRequest): string, number, {string:string}, string + tcp: function(): function(): SSLConnection +end + +return https \ No newline at end of file -- cgit v1.2.3-55-g6feb