Problem with GPG

Werner Koch wk at gnupg.org
Tue Aug 9 19:10:16 CEST 2011


On Tue,  9 Aug 2011 13:34, lists.gnupg-users at duinheks.nl said:

>   gpg (GnuPG) 2.0.18
>   libgcrypt 1.5.0

Okay, I only asked to make sure that we are really using the right
version.

It would be helpful if you could change this function in
gnupg/g10/pkglue.c:

  static gcry_mpi_t
  mpi_from_sexp (gcry_sexp_t sexp, const char * item)
  {
    gcry_sexp_t list;
    gcry_mpi_t data;
  
    list = gcry_sexp_find_token (sexp, item, 0);
    assert (list);
    data = gcry_sexp_nth_mpi (list, 1, GCRYMPI_FMT_USG);
    assert (data);
    gcry_sexp_release (list);
    return data;
  }

to  

  static gcry_mpi_t
  mpi_from_sexp (gcry_sexp_t sexp, const char * item)
  {
    gcry_sexp_t list;
    gcry_mpi_t data;
  
    list = gcry_sexp_find_token (sexp, item, 0);
    assert (list);
    data = gcry_sexp_nth_mpi (list, 1, GCRYMPI_FMT_USG);
    if (!data)
      gcry_sexp_dump (list);
    assert (data);
    gcry_sexp_release (list);
    return data;
  }

That is, insert the two extra lines and run again; you should notice
some debug output right before the assertion failure.


Shalom-Salam,

   Werner


-- 
Die Gedanken sind frei.  Ausnahmen regelt ein Bundesgesetz.




More information about the Gnupg-users mailing list