summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mod_sip_proxy.erl13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/mod_sip_proxy.erl b/src/mod_sip_proxy.erl
index d600da3d..47cd6426 100644
--- a/src/mod_sip_proxy.erl
+++ b/src/mod_sip_proxy.erl
@@ -270,11 +270,16 @@ cancel_pending_transactions(State) ->
lists:foreach(fun esip:cancel/1, State#state.tr_ids).
add_certfile(LServer, Opts) ->
- case ejabberd_config:get_option({domain_certfile, LServer}) of
- CertFile when is_binary(CertFile), CertFile /= <<"">> ->
+ case ejabberd_pkix:get_certfile(LServer) of
+ {ok, CertFile} ->
[{certfile, CertFile}|Opts];
- _ ->
- Opts
+ error ->
+ case ejabberd_config:get_option({domain_certfile, LServer}) of
+ CertFile when is_binary(CertFile) ->
+ [{certfile, CertFile}|Opts];
+ _ ->
+ Opts
+ end
end.
add_via(#sip_socket{type = Transport}, LServer, #sip{hdrs = Hdrs} = Req) ->