From 95c55c0eb57484533f4dd72c10481c66a66a53f2 Mon Sep 17 00:00:00 2001 From: Nikos Mavrogiannopoulos Date: Sat, 28 Jun 2008 01:25:02 +0300 Subject: Initial merge attempt with gnutls_with_ext_mpi --- lib/debug.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'lib/debug.c') diff --git a/lib/debug.c b/lib/debug.c index ef5a4af601..e63e8b019e 100644 --- a/lib/debug.c +++ b/lib/debug.c @@ -117,12 +117,14 @@ _gnutls_handshake2str (gnutls_handshake_description_t handshake) } void -_gnutls_dump_mpi (const char *prefix, mpi_t a) +_gnutls_dump_mpi (const char *prefix, bigint_t a) { + opaque mpi_buf[1024]; opaque buf[1024]; size_t n = sizeof buf; - if (gcry_mpi_print (GCRYMPI_FMT_HEX, buf, n, &n, a)) + if (_gnutls_mpi_print (a, mpi_buf, &n) < 0) strcpy (buf, "[can't print value]"); /* Flawfinder: ignore */ - _gnutls_hard_log ("MPI: length: %d\n\t%s%s\n", (n - 1) / 2, prefix, buf); + else _gnutls_bin2hex (mpi_buf, n, buf, sizeof(buf)); + _gnutls_hard_log ("MPI: length: %d\n\t%s%s\n", n, prefix, buf); } -- cgit v1.2.1