From: Daniel Kahn Gillmor Date: Thu, 30 Dec 2010 22:50:26 +0000 (-0500) Subject: get rid of confusing $primarymatch label, and fix matching based on fingerprints X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=54313980a53b5bfa8b94681fb1a81994002c13ab;p=monkeysphere-validation-agent.git get rid of confusing $primarymatch label, and fix matching based on fingerprints --- diff --git a/Crypt/Monkeysphere/MSVA.pm b/Crypt/Monkeysphere/MSVA.pm index 0133ff4..74c5b17 100755 --- a/Crypt/Monkeysphere/MSVA.pm +++ b/Crypt/Monkeysphere/MSVA.pm @@ -773,13 +773,8 @@ } # treat primary keys just like subkeys: foreach my $subkey ($gpgkey, @{$gpgkey->subkeys}) { - my $primarymatch; - if (defined $key) { - $primarymatch = keycomp($key, $subkey); - } else { - $primarymatch = 1; - } - if ($primarymatch) { + if ((defined($key) && keycomp($key, $subkey)) || + (defined($fpr) && ($subkey->fingerprint->as_hex_string eq $fpr))) { my $iscapable = 0; msvalog('verbose', "key 0x%s matches...\n",$subkey->hex_id); if ($data->{context} eq 'e-mail') {