StartTLSRequired orelse TLSEnabled,
TLSOpts1 = lists:filter(fun ({certfile, _}) -> true;
({ciphers, _}) -> true;
+ ({dhfile, _}) -> true;
(_) -> false
end,
Opts),
TLSEnabled = proplists:get_bool(tls, Opts),
TLSOpts1 = lists:filter(fun ({certfile, _}) -> true;
({ciphers, _}) -> true;
+ ({dhfile, _}) -> true;
(_) -> false
end,
Opts),
undefined -> TLSOpts2;
ProtocolOpts -> [{protocol_options, ProtocolOpts} | TLSOpts2]
end,
+ TLSOpts4 = case ejabberd_config:get_option(
+ s2s_dhfile, fun iolist_to_binary/1) of
+ undefined -> TLSOpts3;
+ DHFile -> [{dhfile, DHFile} | TLSOpts3]
+ end,
TLSOpts = case proplists:get_bool(tls_compression, Opts) of
- false -> [compression_none | TLSOpts3];
- true -> TLSOpts3
+ false -> [compression_none | TLSOpts4];
+ true -> TLSOpts4
end,
Timer = erlang:start_timer(?S2STIMEOUT, self(), []),
{ok, wait_for_stream,
undefined -> TLSOpts2;
ProtocolOpts -> [{protocol_options, ProtocolOpts} | TLSOpts2]
end,
+ TLSOpts4 = case ejabberd_config:get_option(
+ s2s_dhfile, fun iolist_to_binary/1) of
+ undefined -> TLSOpts3;
+ DHFile -> [{dhfile, DHFile} | TLSOpts3]
+ end,
TLSOpts = case ejabberd_config:get_option(
{s2s_tls_compression, From},
fun(true) -> true;
(false) -> false
end, true) of
- false -> [compression_none | TLSOpts3];
- true -> TLSOpts3
+ false -> [compression_none | TLSOpts4];
+ true -> TLSOpts4
end,
{New, Verify} = case Type of
{new, Key} -> {Key, false};