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:
parent
c2b22bd6c1
commit
344a2611f2
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user