From a2bb6665a7eab3fd467a1c7709e8be8c3ac03afa Mon Sep 17 00:00:00 2001 From: Nalin Dahyabhai Date: Apr 08 2011 21:37:11 +0000 Subject: - stop once we've found the key, if we found the key by nickname --- diff --git a/src/keyiread-n.c b/src/keyiread-n.c index cde930a..58b0c19 100644 --- a/src/keyiread-n.c +++ b/src/keyiread-n.c @@ -117,7 +117,7 @@ cm_keyiread_n_get_private_key(struct cm_store_entry *entry, int readwrite) n_login_attempts = 0; n_login_success = 0; for (sle = slotlist->head; - ((sle != NULL) && (sle->slot != NULL)); + (key == NULL) && ((sle != NULL) && (sle->slot != NULL)); sle = sle->next) { /* Read the token's name. */ token = PK11_GetTokenName(sle->slot);