mirror of
https://github.com/processone/ejabberd.git
synced 2024-06-22 22:23:42 +02: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),
|
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…
Reference in New Issue
Block a user