comparison mod_s2s_auth_dane/mod_s2s_auth_dane.lua @ 1353:a17c2c4043e5

mod_s2s_auth_dane: Hack for domains without SRV
author Kim Alvefur <zash@zash.se>
date Tue, 18 Mar 2014 15:36:23 +0100
parents b0f780d3a24e
children 93158d5758f3
comparison
equal deleted inserted replaced
1352:b0f780d3a24e 1353:a17c2c4043e5
86 end 86 end
87 end 87 end
88 88
89 local _try_connect = s2sout.try_connect; 89 local _try_connect = s2sout.try_connect;
90 function s2sout.try_connect(host_session, connect_host, connect_port, err) 90 function s2sout.try_connect(host_session, connect_host, connect_port, err)
91 if not host_session.srv_hosts then
92 host_session.srv_hosts = { target = connect_host, port = connect_port };
93 host_session.srv_choice = 1;
94 end
91 if not err and dane_lookup(host_session, _try_connect, host_session, connect_host, connect_port, err) then 95 if not err and dane_lookup(host_session, _try_connect, host_session, connect_host, connect_port, err) then
92 return true; 96 return true;
93 end 97 end
94 return _try_connect(host_session, connect_host, connect_port, err); 98 return _try_connect(host_session, connect_host, connect_port, err);
95 end 99 end