Fall back to default credential set lookup if fingerprint lookup fails
authorMartin Willi <martin@strongswan.org>
Tue, 15 Sep 2009 06:44:10 +0000 (08:44 +0200)
committerMartin Willi <martin@strongswan.org>
Tue, 15 Sep 2009 06:44:10 +0000 (08:44 +0200)
src/charon/credentials/credential_manager.c

index a34d220..a520fd0 100644 (file)
@@ -1458,7 +1458,11 @@ static private_key_t *get_private(private_credential_manager_t *this,
        /* check if this is a lookup by key ID, and do it if so */
        if (id && id->get_type(id) == ID_KEY_ID)
        {
-               return get_private_by_keyid(this, type, id);
+               private = get_private_by_keyid(this, type, id);
+               if (private)
+               {
+                       return private;
+               }
        }
 
        /* if a specific certificate is preferred, check for a matching key */