gnome-keyring r1533 - in trunk: . pkcs11/user-store



Author: nnielsen
Date: Sun Feb  8 04:57:05 2009
New Revision: 1533
URL: http://svn.gnome.org/viewvc/gnome-keyring?rev=1533&view=rev

Log:
Properly initialize new token private keys, so that they can be saved.

Modified:
   trunk/ChangeLog
   trunk/pkcs11/user-store/gck-user-private-key.c

Modified: trunk/pkcs11/user-store/gck-user-private-key.c
==============================================================================
--- trunk/pkcs11/user-store/gck-user-private-key.c	(original)
+++ trunk/pkcs11/user-store/gck-user-private-key.c	Sun Feb  8 04:57:05 2009
@@ -64,6 +64,7 @@
 factory_create_private_key (GckSession *session, GckTransaction *transaction, 
                             CK_ATTRIBUTE_PTR attrs, CK_ULONG n_attrs, GckObject **object)
 {
+	GckUserPrivateKey *key;
 	GckSexp *sexp;
 	
 	g_return_if_fail (attrs || !n_attrs);
@@ -73,8 +74,11 @@
 	if (sexp == NULL)
 		return;
 	
-	*object = g_object_new (GCK_TYPE_USER_PRIVATE_KEY, "base-sexp", sexp, NULL);
-	gck_private_key_store_private (GCK_PRIVATE_KEY (*object), sexp, G_MAXUINT);
+	key = g_object_new (GCK_TYPE_USER_PRIVATE_KEY, "base-sexp", sexp, NULL);
+	g_return_if_fail (!key->private_sexp);
+	key->private_sexp = gck_sexp_ref (sexp);
+	
+	*object = GCK_OBJECT (key);
 	gck_sexp_unref (sexp);
 }
 



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