25
1
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:
Evgeniy Khramtsov 2017-05-12 17:51:17 +03:00
parent cc58ce6301
commit 2d17a2850c

View File

@ -152,7 +152,10 @@ init([]) ->
ejabberd_hooks:add(route_registered, ?MODULE, route_registered, 50),
Validate = case os:type() of
{win32, _} -> false;
_ -> true
_ ->
code:ensure_loaded(public_key),
erlang:function_exported(
public_key, short_name_hash, 1)
end,
if Validate -> check_ca_dir();
true -> ok