24
1
mirror of https://github.com/processone/ejabberd.git synced 2024-06-12 21:52:07 +02:00

Use ejabberd_pkix API in mod_sip

This commit is contained in:
Evgeniy Khramtsov 2017-11-23 11:09:40 +03:00
parent fbd6ea8a48
commit 25f7f974b9

View File

@ -270,11 +270,16 @@ cancel_pending_transactions(State) ->
lists:foreach(fun esip:cancel/1, State#state.tr_ids). lists:foreach(fun esip:cancel/1, State#state.tr_ids).
add_certfile(LServer, Opts) -> add_certfile(LServer, Opts) ->
case ejabberd_config:get_option({domain_certfile, LServer}) of case ejabberd_pkix:get_certfile(LServer) of
CertFile when is_binary(CertFile), CertFile /= <<"">> -> {ok, CertFile} ->
[{certfile, CertFile}|Opts]; [{certfile, CertFile}|Opts];
_ -> error ->
Opts case ejabberd_config:get_option({domain_certfile, LServer}) of
CertFile when is_binary(CertFile) ->
[{certfile, CertFile}|Opts];
_ ->
Opts
end
end. end.
add_via(#sip_socket{type = Transport}, LServer, #sip{hdrs = Hdrs} = Req) -> add_via(#sip_socket{type = Transport}, LServer, #sip{hdrs = Hdrs} = Req) ->