only bother asking for a marginal UI if the UID of the corresponding key is not fully...
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Tue, 12 Oct 2010 03:35:11 +0000 (23:35 -0400)
committerDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Tue, 12 Oct 2010 03:35:11 +0000 (23:35 -0400)
Crypt/Monkeysphere/MSVA.pm

index 7612ebdc2360c40ebdee4a2db25ae768d9ecdd9e..8ae6b9b583e2d97a6c9f8b65911cf832633bdcbc 100755 (executable)
             }
           }
 
-          my $resp = Crypt::Monkeysphere::MSVA::MarginalUI->ask_the_user($gnupg,
-                                                                         $uid,
-                                                                         \@subvalid_key_fprs,
-                                                                         getpidswithsocketinode($clientinfo->{inode}));
-          msvalog('info', "response: %s\n", $resp);
-          if ($resp) {
-            $ret->{valid} = JSON::true;
-            $ret->{message} = sprintf('Manually validated "%s" through the OpenPGP Web of Trust.', $uid);
+          # only show the marginal UI if the UID of the corresponding
+          # key is not fully valid.
+          if (!$foundvalid) {
+            my $resp = Crypt::Monkeysphere::MSVA::MarginalUI->ask_the_user($gnupg,
+                                                                           $uid,
+                                                                           \@subvalid_key_fprs,
+                                                                           getpidswithsocketinode($clientinfo->{inode}));
+            msvalog('info', "response: %s\n", $resp);
+            if ($resp) {
+              $ret->{valid} = JSON::true;
+              $ret->{message} = sprintf('Manually validated "%s" through the OpenPGP Web of Trust.', $uid);
+            }
           }
         }
       } else {