[gnome-keyring] Fix endless loop when looking for password in login keyring.



commit 7407bcbbb0da9721c9ead7b9253b8dd90b12ccda
Author: Stef Walter <stef memberwebs com>
Date:   Thu Jan 21 14:49:00 2010 +0000

    Fix endless loop when looking for password in login keyring.
    
    If the password for an encryption key was stored in the login
    keyring in the 'old' way, there could be an endless loop if
    it was the wrong password.

 daemon/pkcs11/gkd-pkcs11-auth.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/daemon/pkcs11/gkd-pkcs11-auth.c b/daemon/pkcs11/gkd-pkcs11-auth.c
index 599e212..e9cc232 100644
--- a/daemon/pkcs11/gkd-pkcs11-auth.c
+++ b/daemon/pkcs11/gkd-pkcs11-auth.c
@@ -518,8 +518,15 @@ login_specific_done (CK_SESSION_HANDLE handle, CK_SESSION_INFO *info,
 	case CKR_PIN_INVALID:
 	case CKR_PIN_LEN_RANGE:
 	case CKR_PIN_LOCKED:
+		/* Clear out any stored secret */
 		if (object->unique && object->token)
 			gkd_login_remove_secret ("unique", object->unique, NULL);
+
+		/* COMPAT: Clear old method of storing secrets for objects in login keyring */
+		if (object->digest) {
+			convert_upper_case (object->digest);
+			gkd_login_remove_secret ("object-digest", object->digest, NULL);
+		}
 		break;
 
 	case CKR_OK:



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