From 26c001d1abf1f92b6130cd0fbf5a52b84f9899d9 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Tue, 28 Aug 2018 11:08:00 +0200 Subject: [PATCH] gcrypt: Fix gcrypt error log message in read_bignum(). The message says the error occured while scanning for the public modulus n, which is not true because the function is called for each of the five bignums stored in an RSA private key file. --- gcrypt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcrypt.c b/gcrypt.c index ff4dab37..694c0adb 100644 --- a/gcrypt.c +++ b/gcrypt.c @@ -237,7 +237,7 @@ static int read_bignum(unsigned char *start, unsigned char *end, gcry_mpi_t *bn, PARA_DEBUG_LOG("bn_size %d (0x%x)\n", bn_size, (unsigned)bn_size); gret = gcry_mpi_scan(bn, GCRYMPI_FMT_STD, cp, bn_size, NULL); if (gret) { - PARA_ERROR_LOG("%s while scanning n\n", + PARA_ERROR_LOG("gcry_mpi_scan: %s\n", gcry_strerror(gcry_err_code(gret))); return-E_MPI_SCAN; } -- 2.39.2