Use ejabberd_pkix API in mod_sip
This commit is contained in:
parent
fbd6ea8a48
commit
25f7f974b9
|
@ -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) ->
|
||||
|
|
Loading…
Reference in New Issue