Re: gpg 1.9 for Debian/sarge

Werner Koch <[email protected]>
Newsgroups gmane.comp.encryption.gpg.gpa.devel
Message-ID <[email protected]>
On Sat, 02 Oct 2004 01:39:08 -0400, Matej Cepl said:

> Any thoughts?

You are using an old kgpgcertmanager, IIRC it is now called kleopatra.

Quite some time ago we changed the semantics on how to build the
certificate chain for displaying and Kgpgcertmanager still uses the
old one.  That won't be too severe if it had put a limit on the
maximum chain length to detect such a loop.  I have always suggested
to do this.  A proper way of coding it would be something like:

  int maxdepth = 100;

  k = key->kobj;
  gpgme_key_ref (k);
  while ((s = k->chain_id) && k->subkeys && strcmp (s, k->subkeys->fpr) )
    {
      putc ('\n', fp);
      err = gpgme_op_keylist_start (listctx, s, 0);
      gpgme_key_release (k);
      k = NULL;
      if (!err)
	err = gpgme_op_keylist_next (listctx, &k);
      if (err)
        {
          fprintf (fp, _("Error finding issuer key: %s\n"),
                   gpgme_strerror (err));
          goto leave;
        }
      gpgme_op_keylist_end (listctx);
      
      print_key_info (k, fp);
      if (!--maxdepth)
        {
          putc ('\n', fp);
          fputs (_("Error: certification chain to long - stopping here\n"),
                 fp);
          break;
        }
    }


  Werner
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.