plugins/mod_s2s_auth_certs.lua
changeset 10230 77f900bbbf25
parent 6373 84e7e418c29a
child 10458 6c3fccb75b38
equal deleted inserted replaced
10229:9bdd9b6bf362 10230:77f900bbbf25
    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