Re: gnome-keyring Error using a newly created keyring



On 2011-11-21 13:02, Alberto Mardegan wrote:
On 11/21/2011 01:10 PM, Alberto Mardegan wrote:
I'm calling gnome_keyring_create_sync() to create a new keyring named
"signon-test". The call succeeds (no error code).
But then, all methods on the newly created keyring return error 4 ("No
such keyring"). Am I missing something?

I just went to the GNOME keyring UI and checked the situation: I had a
few keyrings named signon-test_<number>  (indeed, I executed my
application several times -- though I wouldn't expect many keyrings to
be created); I could delete all of them, but two ("signon-test" and
"signon-test_2"), which had a different icon, no name, and the key IDs
are "signon-test" and "signon-test2". I couldn't delete them from the UI.

Which UI is it? 'Passwords and Keys' (ie: seahorse)?

That seems all very strange. Is it a tested scenario, using the GNOME
keyring APIs with different keyrings than the default one?

It should work. Although there are some issues matching the old crufty libgnome-keyring API, with the new Secret Service DBus API. See the comment in create_keyring_start(). Could you share your test application? I can try and reproduce your problem.

I'd like to work with you to figure this out. Can you join us on gimp.net #keyring some time?

(I don't really need to use a different keyring than the default in my
application; but for the unit tests, I wouldn't like to play with the
real keyring, so I'd like my tests to be executed on a different one)

It does sound like a good plan. Do you just need one keyring in you tests, or multiple keyrings and broader testing?

Because if it's the latter, then I've done two different things:

 * in libgnome-keyring we run gnome-keyring-daemon in an alternate
   directory and on an alternate dbus path:


http://git.gnome.org/browse/libgnome-keyring/tree/library/tests/test-keyrings.c#n674

 * in the gsecret library (work in progress) I'm writing a mock secret
   service in python, which can be used to test secret service
   implementations:


http://cgit.collabora.com/git/user/stefw/gsecret.git/tree/library/tests/mock

Cheers,

Stef


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