mirror of
https://github.com/processone/ejabberd
synced 2025-10-03 09:49:18 +02:00
Avoid infinite loop between self-signed certs
This commit is contained in:
parent
c2b22bd6c1
commit
344a2611f2
1 changed files with 8 additions and 3 deletions
|
@ -689,11 +689,16 @@ get_cert_paths(Certs) ->
|
||||||
end, Certs),
|
end, Certs),
|
||||||
lists:foreach(
|
lists:foreach(
|
||||||
fun({Cert1, Cert2}) when Cert1 /= Cert2 ->
|
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 ->
|
true ->
|
||||||
digraph:add_edge(G, Cert1, Cert2);
|
ok;
|
||||||
false ->
|
false ->
|
||||||
ok
|
case public_key:pkix_is_issuer(Cert1, Cert2) of
|
||||||
|
true ->
|
||||||
|
digraph:add_edge(G, Cert1, Cert2);
|
||||||
|
false ->
|
||||||
|
ok
|
||||||
|
end
|
||||||
end;
|
end;
|
||||||
(_) ->
|
(_) ->
|
||||||
ok
|
ok
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue