gpgme list secret keys

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


-----BEGIN PGP SIGNED MESSAGE-----
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: psi.affinix.com


- --

Cheers!

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   http://wrenhunt.homelinux.org/data/wren.vcf             |
| x.509    http://wrenhunt.homelinux.org/data/thawte_wren_hunt.cer |
| OpenPGP  ADF5 1432 A59E 8F4D 4AE7  4DFE 03FA 91E1 4A24 D6F4      |
+------------------------------------------------------------------+


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFCbNFFA/qR4Uok1vQRA3ioAKC1dbgabu9Q9OEjS44CRWT3X5oPRACg1qzw
sTIb7+/oGhbxvcdHoUQezA4=
=MZL1
-----END PGP SIGNATURE-----




More information about the Gnupg-users mailing list