gpgme & gnupg user id inconsistent
Marcus Brinkmann
Marcus.Brinkmann at ruhr-uni-bochum.de
Tue Jan 14 23:31:07 CET 2003
On Mon, Jan 13, 2003 at 07:40:12PM -0600, Jacob Perkins wrote:
> I've created a delete user id edit key op for seahorse, but gpgme and
> gnupg's user id numbering is inconsistent. For instance, in edit key
> mode, the ids are listed as so:
> 1) foo bar
> 2) .test
> but in the key list are listed:
> test
> foo bar
That's one of the many reasons the edit key operation is not official.
> Is there any way to get around this or force gnupg to renumber the user
> ids so 1) is primary always? Or get gnupg's user id number from gpgme?
> The description of GPGME_ATTR_USERID led me to believe that
> gpgme_key_get_ulong of an index would give gnupg's user id number, but
> it only returns 0.
There is no relationship between the edit key operation and the GPGME key
structure. You will have to parse the output of the edit key operation and
find the user id you want. As an etxra check you can check that after "uid
N" the correct user id is selected (flag "s" set in the last field).
Thanks,
Marcus
--
`Rhubarb is no Egyptian god.' GNU http://www.gnu.org marcus at gnu.org
Marcus Brinkmann The Hurd http://www.gnu.org/software/hurd/
Marcus.Brinkmann at ruhr-uni-bochum.de
http://www.marcus-brinkmann.de/
More information about the Gnupg-devel
mailing list