equal
deleted
inserted
replaced
15 end |
15 end |
16 |
16 |
17 local chain_valid, errors; |
17 local chain_valid, errors; |
18 if conn.getpeerverification then |
18 if conn.getpeerverification then |
19 chain_valid, errors = conn:getpeerverification(); |
19 chain_valid, errors = conn:getpeerverification(); |
20 elseif conn.getpeerchainvalid then -- COMPAT mw/luasec-hg |
|
21 chain_valid, errors = conn:getpeerchainvalid(); |
|
22 errors = (not chain_valid) and { { errors } } or nil; |
|
23 else |
20 else |
24 chain_valid, errors = false, { { "Chain verification not supported by this version of LuaSec" } }; |
21 chain_valid, errors = false, { { "Chain verification not supported by this version of LuaSec" } }; |
25 end |
22 end |
26 -- Is there any interest in printing out all/the number of errors here? |
23 -- Is there any interest in printing out all/the number of errors here? |
27 if not chain_valid then |
24 if not chain_valid then |