Fix a for a bug fix in the latest Libgcrypt.

* pkglue.c (mpi_from_sexp, pk_decrypt): Use GCRYMPI_FMT_USG for
	gcry_sexp_nth_mpi.  This fixes a problem with a recent bug fix in
	Libgcrypt.
This commit is contained in:
Werner Koch 2011-06-13 14:35:30 +02:00
parent af497d52c3
commit 13290b0e0f
2 changed files with 177 additions and 171 deletions

File diff suppressed because it is too large Load Diff

View File

@ -34,10 +34,10 @@ 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, 0);
data = gcry_sexp_nth_mpi (list, 1, GCRYMPI_FMT_USG);
assert (data);
gcry_sexp_release (list);
return data;
@ -293,7 +293,7 @@ pk_decrypt (int algo, gcry_mpi_t * result, gcry_mpi_t * data,
if (rc)
return rc;
*result = gcry_sexp_nth_mpi (s_plain, 0, 0);
*result = gcry_sexp_nth_mpi (s_plain, 0, GCRYMPI_FMT_USG);
gcry_sexp_release (s_plain);
if (!*result)
return -1; /* oops */