[gnutls-dev] [PATCH] Fixing OpenPGP keyring import (again)

Ludovic Courtès ludo at chbouib.org
Mon May 14 19:20:47 CEST 2007

ludo at chbouib.org (Ludovic Courtès) writes:

> The issue now is that "gpg --export -a < ./keyring.gpg > ./keyring.asc"
> includes my own keyring (from `~/.gnupg/pubring.gpg') into its output.

I was able to work around it this way:

  $ gpg --keyring ./openpgp-keyring.gpg -a --export A7D93C3F CCC07C35 > t

(Where `openpgp-keyring.gpg' is the raw keyring we use in `keyring.c'.)

There's one last fix need for ASCII-import to work: `cdk_stream_close ()'
must not be called when `cdk_keydb_new_from_stream ()' succeeds
(patch attached).  I tested it (ASCII-import, followed by `check_id ()'
calls) from a Guile script and it does work with the patch applied
(segfaults otherwise).

BTW, you removed the repeated `if (err) { gnutls_assert () ... }' that
appeared in my patch.  I don't think this is a good idea: having
repeated `gnutls_assert ()' calls allows one to pinpoint the exact
source of a failure.

Also, please do update the `ChangeLog' file, it makes it easier to
follow what goes on.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: ,,keyring-import-3.diff
Type: text/x-patch
Size: 702 bytes
Desc: Fix for ASCII-armored import
URL: </pipermail/attachments/20070514/6dd533a6/attachment.bin>

More information about the Gnutls-devel mailing list