25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-24 16:23:40 +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), 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