summaryrefslogtreecommitdiff
path: root/src/ejabberd_s2s_out.erl
diff options
context:
space:
mode:
authorAlexey Shchepin <alexey@process-one.net>2014-04-15 19:01:21 +0400
committerAlexey Shchepin <alexey@process-one.net>2014-04-15 19:01:21 +0400
commitf93758a3cd9a5eca47510f906e5edbaaeb6db2ec (patch)
tree99077e53dd62cbfc5bf6d6f64f42f8ee248f6887 /src/ejabberd_s2s_out.erl
parentMerge pull request #167 from weiss/fix-modules-doc (diff)
parentAdd option to specify openssl options (diff)
Merge pull request #160 from runcom/protocol_options
Add option to specify openssl options
Diffstat (limited to 'src/ejabberd_s2s_out.erl')
-rw-r--r--src/ejabberd_s2s_out.erl16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/ejabberd_s2s_out.erl b/src/ejabberd_s2s_out.erl
index 8e4454d0..a0a83631 100644
--- a/src/ejabberd_s2s_out.erl
+++ b/src/ejabberd_s2s_out.erl
@@ -195,13 +195,25 @@ init([From, Server, Type]) ->
undefined -> TLSOpts1;
Ciphers -> [{ciphers, Ciphers} | TLSOpts1]
end,
+ TLSOpts3 = case ejabberd_config:get_option(
+ s2s_protocol_options,
+ fun (Options) ->
+ [_|O] = lists:foldl(
+ fun(X, Acc) -> X ++ Acc end, [],
+ [["|" | binary_to_list(Opt)] || Opt <- Options, is_binary(Opt)]
+ ),
+ iolist_to_binary(O)
+ end) of
+ undefined -> TLSOpts2;
+ ProtocolOpts -> [{protocol_options, ProtocolOpts} | TLSOpts2]
+ end,
TLSOpts = case ejabberd_config:get_option(
{s2s_tls_compression, From},
fun(true) -> true;
(false) -> false
end, true) of
- false -> [compression_none | TLSOpts2];
- true -> TLSOpts2
+ false -> [compression_none | TLSOpts3];
+ true -> TLSOpts3
end,
{New, Verify} = case Type of
{new, Key} -> {Key, false};