[gnome-keyring] [gp11] Don't keep authenticating if protected auth path.



commit e2ca65eb4842c78e7b7fb84e5c6c745857d6579a
Author: Stef Walter <stef memberwebs com>
Date:   Sun Jul 11 22:57:44 2010 +0000

    [gp11] Don't keep authenticating if protected auth path.
    
     * With protected auth path, it CKR_PIN_INCORRECT means the
       user cancelled or gave up.

 gp11/gp11-session.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gp11/gp11-session.c b/gp11/gp11-session.c
index 9541d0e..a571630 100644
--- a/gp11/gp11-session.c
+++ b/gp11/gp11-session.c
@@ -2118,7 +2118,7 @@ authenticate_perform (Authenticate *args, GP11Arguments *base)
 		pin_len = args->password ? strlen (args->password) : 0; 
 		rv = (base->pkcs11->C_Login) (base->handle, CKU_CONTEXT_SPECIFIC, 
 		                              (CK_UTF8CHAR_PTR)args->password, pin_len);
-		if (rv == CKR_PIN_INCORRECT) 
+		if (rv == CKR_PIN_INCORRECT && !args->protected_auth)
 			args->state = AUTHENTICATE_WANT;
 		else
 			args->state = AUTHENTICATE_NONE;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]