From: Daniel Kahn Gillmor Date: Mon, 20 Dec 2010 07:36:42 +0000 (-0500) Subject: List certifiers only once (closes MS # 2573) X-Git-Tag: msva-perl_debian/0.8-1~1^2~6 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=ec5900ba709352315c307978b14ef6d38e1d1453;p=monkeysphere-validation-agent.git List certifiers only once (closes MS # 2573) --- diff --git a/Changelog b/Changelog index 7e9e0e4..aa282b3 100644 --- a/Changelog +++ b/Changelog @@ -7,9 +7,10 @@ msva-perl (0.8~pre) upstream; * allow the use of ports in hostnames (closes MS # 2665) * Do not report self-sigs as other certifiers (but report valid, non-matching identities independently) (closes MS # 2569) + * List certifiers only once (closes MS # 2573) + + -- Daniel Kahn Gillmor Mon, 20 Dec 2010 02:35:54 -0500 - -- Daniel Kahn Gillmor Mon, 20 Dec 2010 01:53:48 -0500 - msva-perl (0.7) upstream; * udpated msva-query-agent documentation diff --git a/Crypt/Monkeysphere/MSVA/MarginalUI.pm b/Crypt/Monkeysphere/MSVA/MarginalUI.pm index e03f838..c386a98 100755 --- a/Crypt/Monkeysphere/MSVA/MarginalUI.pm +++ b/Crypt/Monkeysphere/MSVA/MarginalUI.pm @@ -85,15 +85,20 @@ # grab the first full or ultimate user ID on # this certifier's key: if ($cuid->validity =~ /^[fu]$/) { - push(@vcertifiers, { key_id => $cert->hex_id, - user_id => $cuid->as_string, - } ); - $valid_cuid = 1; + if (0 == grep { $_->{key_id} eq $cert->hex_id && $_->{user_id} eq $cuid->as_string ; } @vcertifiers) { + push(@vcertifiers, { key_id => $cert->hex_id, + user_id => $cuid->as_string, + } ); + $valid_cuid = 1; + }; last; - } elsif ($cuid->validity =~ /^[m]$/) { - $marginal = { key_id => $cert->hex_id, - user_id => $cuid->as_string, - }; + } elsif ((!defined ($marginal)) && + $cuid->validity =~ /^[m]$/) { + if (0 == grep { $_->{key_id} eq $cert->hex_id && $_->{user_id} eq $cuid->as_string ; } @mcertifiers) { + $marginal = { key_id => $cert->hex_id, + user_id => $cuid->as_string, + }; + } } } push(@mcertifiers, $marginal)