aboutsummaryrefslogblamecommitdiffstats
path: root/src/openssl.ssl.context.lua
blob: 2da84de624dd5a8d95ecc1ee0a5e3a400e098e30 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

                                         












                                                                                                 
          
local ctx = require"_openssl.ssl.context"

local pack = table.pack or function(...) return { n = select("#", ...); ... } end

-- Allow passing a vararg of ciphers, or an array
local setCipherList; setCipherList = ctx.interpose("setCipherList", function (self, ciphers, ...)
	if (...) then
		local ciphers_t = pack(...)
		ciphers = table.concat(ciphers_t, ":", 1, ciphers_t.n)
	elseif type(ciphers) == "table" then
		ciphers = table.concat(ciphers, ":")
	end
	return setCipherList(self, ciphers)
end)

return ctx