mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-22 16:20:52 +01:00
Only validate certfiles if public_key:short_name_hash/1 is available
This commit is contained in:
parent
cc58ce6301
commit
2d17a2850c
@ -152,7 +152,10 @@ init([]) ->
|
|||||||
ejabberd_hooks:add(route_registered, ?MODULE, route_registered, 50),
|
ejabberd_hooks:add(route_registered, ?MODULE, route_registered, 50),
|
||||||
Validate = case os:type() of
|
Validate = case os:type() of
|
||||||
{win32, _} -> false;
|
{win32, _} -> false;
|
||||||
_ -> true
|
_ ->
|
||||||
|
code:ensure_loaded(public_key),
|
||||||
|
erlang:function_exported(
|
||||||
|
public_key, short_name_hash, 1)
|
||||||
end,
|
end,
|
||||||
if Validate -> check_ca_dir();
|
if Validate -> check_ca_dir();
|
||||||
true -> ok
|
true -> ok
|
||||||
|
Loading…
Reference in New Issue
Block a user