mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-22 16:20:52 +01:00
Merge pull request #184 from weiss/properly-abort-s2s-in
Fix handling of certificate verification errors for incoming s2s connections
This commit is contained in:
commit
68e62d7442
@ -294,15 +294,9 @@ wait_for_stream({xmlstreamstart, _Name, Attrs},
|
||||
?INFO_MSG("Closing s2s connection: ~s <--> ~s (~s)",
|
||||
[StateData#state.server, RemoteServer, CertError]),
|
||||
send_text(StateData,
|
||||
xml:element_to_binary(?SERRT_POLICY_VIOLATION(<<"en">>,
|
||||
CertError))),
|
||||
{atomic, Pid} =
|
||||
ejabberd_s2s:find_connection(jlib:make_jid(<<"">>,
|
||||
Server, <<"">>),
|
||||
jlib:make_jid(<<"">>,
|
||||
RemoteServer,
|
||||
<<"">>)),
|
||||
ejabberd_s2s_out:stop_connection(Pid),
|
||||
<<(xml:element_to_binary(?SERRT_POLICY_VIOLATION(<<"en">>,
|
||||
CertError)))/binary,
|
||||
(?STREAM_TRAILER)/binary>>),
|
||||
{stop, normal, StateData};
|
||||
{VerifyResult, RemoteServer, Msg} ->
|
||||
{SASL, NewStateData} = case VerifyResult of
|
||||
|
Loading…
Reference in New Issue
Block a user