mirror of
https://github.com/processone/ejabberd.git
synced 2024-06-14 22:00:16 +02:00
Don't call pkix_is_self_signed/1 too frequently
This commit is contained in:
parent
97c9058246
commit
f1ac793d56
|
@ -767,22 +767,22 @@ get_cert_paths(Certs, G) ->
|
||||||
end, Certs).
|
end, Certs).
|
||||||
|
|
||||||
add_edges(G, [Cert1|T], L) ->
|
add_edges(G, [Cert1|T], L) ->
|
||||||
lists:foreach(
|
case public_key:pkix_is_self_signed(Cert1) of
|
||||||
fun(Cert2) when Cert1 /= Cert2 ->
|
true ->
|
||||||
case public_key:pkix_is_self_signed(Cert1) of
|
ok;
|
||||||
true ->
|
false ->
|
||||||
ok;
|
lists:foreach(
|
||||||
false ->
|
fun(Cert2) when Cert1 /= Cert2 ->
|
||||||
case public_key:pkix_is_issuer(Cert1, Cert2) of
|
case public_key:pkix_is_issuer(Cert1, Cert2) of
|
||||||
true ->
|
true ->
|
||||||
digraph:add_edge(G, Cert1, Cert2);
|
digraph:add_edge(G, Cert1, Cert2);
|
||||||
false ->
|
false ->
|
||||||
ok
|
ok
|
||||||
end
|
end;
|
||||||
end;
|
(_) ->
|
||||||
(_) ->
|
ok
|
||||||
ok
|
end, L)
|
||||||
end, L),
|
end,
|
||||||
add_edges(G, T, L);
|
add_edges(G, T, L);
|
||||||
add_edges(_, [], _) ->
|
add_edges(_, [], _) ->
|
||||||
ok.
|
ok.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user