mirror of
https://github.com/brunoos/luasec.git
synced 2025-07-12 22:14:23 +02:00
Examples update.
This commit is contained in:
@ -14,7 +14,6 @@ local params = {
|
||||
options = {"all", "no_sslv2"},
|
||||
}
|
||||
|
||||
|
||||
-- [[ SSL context
|
||||
local ctx = assert(ssl.newcontext(params))
|
||||
--]]
|
||||
|
@ -12,14 +12,13 @@ local params = {
|
||||
cafile = "../../certs/rootB.pem",
|
||||
verify = {"peer", "fail_if_no_peer_cert"},
|
||||
options = {"all", "no_sslv2"},
|
||||
verifyext = {"lsec_continue"},
|
||||
}
|
||||
|
||||
-- [[ SSL context
|
||||
local ctx = assert(ssl.newcontext(params))
|
||||
--]]
|
||||
|
||||
ctx:setverifyext("lsec_continue")
|
||||
|
||||
local peer = socket.tcp()
|
||||
peer:connect("127.0.0.1", 8888)
|
||||
|
||||
|
@ -12,15 +12,13 @@ local params = {
|
||||
cafile = "../../certs/rootA.pem",
|
||||
verify = {"peer", "fail_if_no_peer_cert"},
|
||||
options = {"all", "no_sslv2"},
|
||||
verifyext = {"lsec_continue", "crl_check", "crl_check_chain"},
|
||||
}
|
||||
|
||||
|
||||
-- [[ SSL context
|
||||
local ctx = assert(ssl.newcontext(params))
|
||||
--]]
|
||||
|
||||
ctx:setverifyext("lsec_continue", "crl_check", "crl_check_chain")
|
||||
|
||||
local server = socket.tcp()
|
||||
server:setoption('reuseaddr', true)
|
||||
assert( server:bind("127.0.0.1", 8888) )
|
||||
|
Reference in New Issue
Block a user