[gnome-keyring] [secrets] Create unlock credentials with correct attributes.



commit a5f30e5edb4ff2b208092db09969530bfe4c74b4
Author: Stef Walter <stef memberwebs com>
Date:   Sat Feb 6 15:43:01 2010 +0000

    [secrets] Create unlock credentials with correct attributes.
    
    Some minor fixes for creating unlock credentials with the right
    attributes, such as making them available to all applications.

 daemon/prompt/gkd-prompt.c                  |    2 ++
 pkcs11/secret-store/gck-secret-collection.c |    1 +
 2 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/daemon/prompt/gkd-prompt.c b/daemon/prompt/gkd-prompt.c
index ea03478..a704bfc 100644
--- a/daemon/prompt/gkd-prompt.c
+++ b/daemon/prompt/gkd-prompt.c
@@ -823,6 +823,8 @@ gkd_prompt_get_unlock_options (GkdPrompt *self, GP11Attributes *attrs)
 	g_return_if_fail (attrs);
 	g_return_if_fail (self->pv->output);
 
+	gp11_attributes_add_boolean (attrs, CKA_TOKEN, TRUE);
+
 	bval = g_key_file_get_boolean (self->pv->output, "unlock-options", "unlock-auto", NULL);
 	gp11_attributes_add_boolean (attrs, CKA_GNOME_TRANSIENT, !bval);
 
diff --git a/pkcs11/secret-store/gck-secret-collection.c b/pkcs11/secret-store/gck-secret-collection.c
index 1769ea9..45f1bd2 100644
--- a/pkcs11/secret-store/gck-secret-collection.c
+++ b/pkcs11/secret-store/gck-secret-collection.c
@@ -479,6 +479,7 @@ gck_secret_collection_init (GckSecretCollection *self)
 	CK_BBOOL token = CK_TRUE;
 	CK_ATTRIBUTE attrs[] = {
 		{ CKA_TOKEN, &token, sizeof (token) },
+		{ CKA_GNOME_TRANSIENT, &token, sizeof (token) },
 		{ CKA_G_DESTRUCT_IDLE, &idle, sizeof (idle) },
 		{ CKA_G_DESTRUCT_AFTER, &after, sizeof (after) },
 	};



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