From: Andre Noll Date: Mon, 4 Jul 2011 22:08:14 +0000 (+0200) Subject: gcrypt: Use GCRYMPI_FMT_USG for gcry_sexp_nth_mpi(). X-Git-Tag: v0.4.8~21^2~2 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=542c254a490d4d13ab581455ff4712f19d80e361;hp=2f514379bfe57337f903fb362c5c79218d072901 gcrypt: Use GCRYMPI_FMT_USG for gcry_sexp_nth_mpi(). The manual says: If you use this function to parse results of a public key function, you most likely want to use `GCRYMPI_FMT_USG'. --- diff --git a/gcrypt.c b/gcrypt.c index 1312aaed..49e27f2d 100644 --- a/gcrypt.c +++ b/gcrypt.c @@ -837,7 +837,7 @@ int pub_encrypt(struct asymmetric_key *pub, unsigned char *inbuf, if (!out_a) goto out_release; /* convert sexp out_a -> out_mpi */ - out_mpi = gcry_sexp_nth_mpi(out_a, 1, GCRYMPI_FMT_STD); + out_mpi = gcry_sexp_nth_mpi(out_a, 1, GCRYMPI_FMT_USG); if (!out_mpi) { ret = -E_SEXP_FIND; goto out_a_release;