gpgme list secret keys

J. Wren Hunt wren at
Mon Apr 25 13:15:17 CEST 2005

Hash: RIPEMD160

Matthijs Mohlmann wrote:
> Hi,
> I'm trying to write a plugin for gaim to get GPG encryption support in
> gaim. Now i came across the following. I want the user to choose their
> secret key. How can i do this ? I have the following piece of code and
> read the documentation several times but it seems impossible (i think i
> misread the documentation)
>   if (!err) {
>     err = gpgme_op_keylist_start(ctx, NULL, 0);
>     while (!err) {
>       uid = key->uids;
>       subkey = key->subkeys;
>       printf("%s: %s <%s>\n", subkey->keyid, uid->name, uid->email);
>       err = gpgme_op_keylist_next(ctx, &key);
>     }
>     gpgme_release(ctx);
>   }
> Problem with this code is that i don't have a "key" at that moment
> available. So i have to do something else.. but how can i do that ?
> I hope you can help me.
> Matthijs Mohlmann
> PS: i'm off the list so please CC me.

You may be interested in the OpenPGP code logic used by the Psi Jabber
client at:

- --


J. Wren Hunt
Cambridge, MA. USA

- ------------
"The difference between the right word and the almost right word is the
difference between lightning and the lightning bug."
                -- Mark Twain

| v-card             |
| x.509 |
| OpenPGP  ADF5 1432 A59E 8F4D 4AE7  4DFE 03FA 91E1 4A24 D6F4      |

Version: GnuPG v1.4.1 (Darwin)


More information about the Gnupg-users mailing list