mod_s2s_log_certs/mod_s2s_log_certs.lua
changeset 1791 663e5d923ef0
parent 1091 79ef0427765f
equal deleted inserted replaced
1790:8ad2c526404c 1791:663e5d923ef0
    36 		identity_status = identity_status;
    36 		identity_status = identity_status;
    37 		dm_store(remote_host, local_host, "s2s_certs", seen_certs);
    37 		dm_store(remote_host, local_host, "s2s_certs", seen_certs);
    38 	end
    38 	end
    39 end
    39 end
    40 
    40 
    41 module:hook("s2s-check-certificate", note_cert_digest, 1000);
    41 if module.wrap_event then
       
    42 	-- 0.10
       
    43 	module:wrap_event("s2s-check-certificate", function (handlers, event_name, event_data)
       
    44 		local ret = handlers(event_name, event_data);
       
    45 		note_cert_digest(event_data);
       
    46 		return ret;
       
    47 	end);
       
    48 else
       
    49 	-- 0.9
       
    50 	module:hook("s2s-check-certificate", note_cert_digest, 1000);
       
    51 end
    42 --[[
    52 --[[
    43 function module.add_host(module)
    53 function module.add_host(module)
    44 	module:hook("s2s-check-certificate", note_cert_digest, 1000);
    54 	module:hook("s2s-check-certificate", note_cert_digest, 1000);
    45 end
    55 end
    46 ]]
    56 ]]