25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-24 16:23:40 +01:00

Avoid infinite loop between self-signed certs

This commit is contained in:
Evgeniy Khramtsov 2017-12-07 00:29:19 +03:00
parent c2b22bd6c1
commit 344a2611f2

View File

@ -689,11 +689,16 @@ get_cert_paths(Certs) ->
end, Certs),
lists:foreach(
fun({Cert1, Cert2}) when Cert1 /= Cert2 ->
case public_key:pkix_is_issuer(Cert1, Cert2) of
case public_key:pkix_is_self_signed(Cert1) of
true ->
digraph:add_edge(G, Cert1, Cert2);
ok;
false ->
ok
case public_key:pkix_is_issuer(Cert1, Cert2) of
true ->
digraph:add_edge(G, Cert1, Cert2);
false ->
ok
end
end;
(_) ->
ok