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

Ludovic Courtès ludovic.courtes at laas.fr
Tue May 22 09:46:53 CEST 2007


Hi,

Timo Schulz <twoaday at gmx.net> writes:

> Actually the function code also contains another error.
> Due to the nature of cdk_keydb_new_from_stream(),
> the function do not close the stream at the end, cdk_keydb_close(),
> itself, so we need to store it separately and close it
> later.

Hmm, good point!

There's still something wrong with what you checked in, though:

  err = cdk_stream_tmp_from_mem (data->data, data->size, &input);
  if (!err)
    err = cdk_stream_set_armor_flag (input, 0);
  if (!err)
    err = cdk_keydb_new_from_stream (&keyring->db, 0, input);  
  if (err)
    {
      cdk_stream_close (input);
      gnutls_assert ();
    }

That won't work if `cdk_stream_tmp_from_mem ()' returns an error.

How about ChangeLog entries BTW?

> I already modified the code but I still need to test it.

Please, run the tests in Guile-GnuTLS 0.1 [*].  You need Guile 1.8 and
then run "make check".

I'm currently unable to compile GnuTLS from HEAD because of something
fishy going on with Gnulib:

  $ make CFLAGS='-g -Wall' -j2
  make: *** No rule to make target `gl/m4/getpass.m4', needed by `Makefile.in'.  Stop.

  $ find -name getpass.m4
  ./lgl/m4/getpass.m4

  $ grep -r getpass gl/
  gl/Makefile:# Reproduce by: gnulib-tool --import --dir=. --local-dir=gl/override --lib=libgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --aux-dir=. --avoid=snprintf --avoid=vasnprintf --makefile-name=gnulib.mk --libtool --macro-prefix=gl arpa_inet fdl gendocs getaddrinfo getline getpass gpl inet_ntop inet_pton lgpl maintainer-makefile readline
  gl/Makefile:    $(top_srcdir)/gl/m4/getpass.m4 \
  gl/Makefile:    getdelim.h getline.c getline.h getpass.c getpass.h inet_ntop.c \
  gl/Makefile:    getline.c getpass.c inet_ntop.c inet_pton.c readline.c \
  gl/Makefile:include ./$(DEPDIR)/getpass.Plo
  gl/Makefile.in: $(top_srcdir)/lgl/m4/getpass.m4 \

So, for some reason, the generated `Makefile' gets the path to
`getpass.m4' wrong, although `Makefile.in' has the right one.

Running `autoreconf', `automake' or `gnulib-tool --update' doesn't
help.  Any idea?

Thanks,
Ludovic.

[*] http://www.laas.fr/~lcourtes/software/guile/guile-gnutls-0.1.tar.gz





More information about the Gnutls-devel mailing list