From 542c254a490d4d13ab581455ff4712f19d80e361 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Tue, 5 Jul 2011 00:08:14 +0200 Subject: [PATCH] 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'. --- gcrypt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.39.2