From: Martin Willi Date: Thu, 2 May 2013 08:07:36 +0000 (+0200) Subject: credmgr: stop querying for secrets once we get a perfect match X-Git-Tag: 5.1.0rc1~25^2~33 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5d36f04ee27ad6324ec3d81b7cb47577d87476de;p=thirdparty%2Fstrongswan.git credmgr: stop querying for secrets once we get a perfect match --- diff --git a/src/libstrongswan/credentials/credential_manager.c b/src/libstrongswan/credentials/credential_manager.c index 35d98458c3..fa255551bf 100644 --- a/src/libstrongswan/credentials/credential_manager.c +++ b/src/libstrongswan/credentials/credential_manager.c @@ -393,6 +393,10 @@ METHOD(credential_manager_t, get_shared, shared_key_t*, best_me = match_me; best_other = match_other; } + if (best_me == ID_MATCH_PERFECT && best_other == ID_MATCH_PERFECT) + { + break; + } } enumerator->destroy(enumerator); return found;