mirror of
https://github.com/processone/ejabberd
synced 2025-10-03 01:39:35 +02:00
Let 'domain_certfile' take higher precedence
If a 'domain_certfile' is specified, use that instead of the 's2s_certfile' (or 'c2s_certfile').
This commit is contained in:
parent
63aabed320
commit
64150cc7c5
2 changed files with 4 additions and 4 deletions
|
@ -303,9 +303,9 @@ tls_options(#{lserver := LServer, tls_options := DefaultOpts,
|
||||||
{true, CertFile} when CertFile /= undefined -> DefaultOpts;
|
{true, CertFile} when CertFile /= undefined -> DefaultOpts;
|
||||||
{_, _} ->
|
{_, _} ->
|
||||||
case ejabberd_config:get_option(
|
case ejabberd_config:get_option(
|
||||||
{c2s_certfile, LServer},
|
{domain_certfile, LServer},
|
||||||
ejabberd_config:get_option(
|
ejabberd_config:get_option(
|
||||||
{domain_certfile, LServer})) of
|
{c2s_certfile, LServer})) of
|
||||||
undefined -> DefaultOpts;
|
undefined -> DefaultOpts;
|
||||||
CertFile -> lists:keystore(certfile, 1, DefaultOpts,
|
CertFile -> lists:keystore(certfile, 1, DefaultOpts,
|
||||||
{certfile, CertFile})
|
{certfile, CertFile})
|
||||||
|
|
|
@ -199,9 +199,9 @@ dirty_get_connections() ->
|
||||||
-spec tls_options(binary(), [proplists:property()]) -> [proplists:property()].
|
-spec tls_options(binary(), [proplists:property()]) -> [proplists:property()].
|
||||||
tls_options(LServer, DefaultOpts) ->
|
tls_options(LServer, DefaultOpts) ->
|
||||||
TLSOpts1 = case ejabberd_config:get_option(
|
TLSOpts1 = case ejabberd_config:get_option(
|
||||||
{s2s_certfile, LServer},
|
{domain_certfile, LServer},
|
||||||
ejabberd_config:get_option(
|
ejabberd_config:get_option(
|
||||||
{domain_certfile, LServer})) of
|
{s2s_certfile, LServer})) of
|
||||||
undefined -> DefaultOpts;
|
undefined -> DefaultOpts;
|
||||||
CertFile -> lists:keystore(certfile, 1, DefaultOpts,
|
CertFile -> lists:keystore(certfile, 1, DefaultOpts,
|
||||||
{certfile, CertFile})
|
{certfile, CertFile})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue