From 58392cd1a084f575c93c141c4c8250bd3d843c64 Mon Sep 17 00:00:00 2001 From: Jameson Rollins Date: Sat, 25 Dec 2010 11:57:07 -0500 Subject: [PATCH] tweaks to break out of unnecessary extra key loops if a valid key is found --- Crypt/Monkeysphere/MSVA.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Crypt/Monkeysphere/MSVA.pm b/Crypt/Monkeysphere/MSVA.pm index 86be5da..b576f98 100755 --- a/Crypt/Monkeysphere/MSVA.pm +++ b/Crypt/Monkeysphere/MSVA.pm @@ -798,6 +798,7 @@ msvalog('verbose', "...and is fully valid!\n"); $ret->{valid} = JSON::true; $ret->{message} = sprintf('Successfully validated "%s" through the OpenPGP Web of Trust.', $uid); + last; } else { msvalog('verbose', "...but is not fully valid.\n"); push(@subvalid_key_fprs, { fpr => $subkey->fingerprint, val => $validity }) if $lastloop; @@ -805,8 +806,9 @@ } } } + last if ($foundvalid); } - if ($lastloop) { + if ($lastloop || $foundvalid) { last; } else { if (!$foundvalid) { -- 2.26.2