[gnome-keyring] [gp11] Open readonly sessions when enumerating objects.



commit c3c01300f0a67f4f131dc53a13f42d30093a5b55
Author: Stef Walter <stef memberwebs com>
Date:   Sun Jul 11 23:17:20 2010 +0000

    [gp11] Open readonly sessions when enumerating objects.
    
     * This is an interim measure. When GP11 is redone the API
       should allow the caller to specify this.

 gp11/gp11-module.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/gp11/gp11-module.c b/gp11/gp11-module.c
index 8537a2d..da855dd 100644
--- a/gp11/gp11-module.c
+++ b/gp11/gp11-module.c
@@ -1167,7 +1167,9 @@ gp11_module_enumerate_objects_full (GP11Module *self, GP11Attributes *attrs,
 	slots = gp11_module_get_slots (self, TRUE);
 	
 	for (l = slots; ret && !stop && l; l = g_list_next (l)) {
-		session = gp11_slot_open_session (l->data, CKF_SERIAL_SESSION, &error);
+
+		/* TODO: We really should allow the caller to specify the flags, at least read-write */
+		session = gp11_slot_open_session (l->data, CKF_RW_SESSION | CKF_SERIAL_SESSION, &error);
 		if (!session) {
 			g_return_val_if_fail (error != NULL, FALSE);
 			



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