Re: Gedit plugin



On 27.04.2013 20:40, Pietro Battiston wrote:
Il giorno sab, 27/04/2013 alle 13.45 +0200, Stef Walter ha scritto:
On 27.04.2013 12:18, Pietro Battiston wrote:
Il giorno sab, 27/04/2013 alle 11.24 +0200, Stef Walter ha scritto:
On 27.04.2013 09:35, Pietro Battiston wrote:


[...]

Instead I have another question: of all the keys I get with the
"ListKeys" function of org.gnome.seahorse.Keys, some have a "raw-id"
looking like "04E29C73", some like "B0894B0104E29C73:2". All of my tests
seem to show that those of the first kind are able to encrypt, those of
the second are not
(org.freedesktop.DBus.GLib.UnmappedError.Org.gnome.seahorse.Error.Failed.Code1: Key is not a valid 
recipient for encryption). But can I reliably establish that I can drop all keys with the "raw-id" 
longer than 8 digits when asking the user for a key to encrypt? Or is there a better method to do this 
filtering?

Again, looks like a bug to me. It's hard to know how to answer this
question off hand. libcryptui and that DBus interface is really old and
not really in use anymore. But happy to help integrate patches if you do
find the bug.


I'll try to take a look (but again that's not a stopper to me).

But your answer triggers an obvious (possibly final) question: is there
some suggested replacement to "libcryptui and that DBus interface" which
is "not really in use anymore"? Did I make an obvious mistake in relying
on it with newly written code?

I would suggest using gpgme directly. This is far more efficient,
although may take one or two more steps. If you need pointers on how to
accomplish this I can help.


Wow, I've seen some examples of the Python bindings and indeed I should
have spotted it sooner... when I have a free hour, I'll rewrite my code
using it. I just will have to take care of the password request dialog
(right?), which seahorse provided.

Hmmm, good point.

In general gnome-keyring will provide a password prompt automatically
for you through its gpg-agent.

In the 'Gcr' library I'm building a UI selector similar to what is in
libcryptui, but that may not be related to what you're doing.


Uhm... I googled for gcr, but I didn't really understand what it is.

Here you go:

https://developer.gnome.org/gcr/unstable/

I could move the seahorse password prompting code to the Gcr library and
integrate it there in a more future proof manner. If this is useful to
you...

Cheers,

Stef


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