From 54313980a53b5bfa8b94681fb1a81994002c13ab Mon Sep 17 00:00:00 2001 From: Daniel Kahn Gillmor Date: Thu, 30 Dec 2010 17:50:26 -0500 Subject: [PATCH] get rid of confusing $primarymatch label, and fix matching based on fingerprints --- Crypt/Monkeysphere/MSVA.pm | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) 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') { -- 2.26.2