diff options
author | Nikos Mavrogiannopoulos <nmav@crystal.(none)> | 2008-06-28 01:25:02 +0300 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@crystal.(none)> | 2008-06-28 01:25:02 +0300 |
commit | 95c55c0eb57484533f4dd72c10481c66a66a53f2 (patch) | |
tree | 3bc580f54abd1775b28415ae8e20aab4fe2baade /lib/debug.c | |
parent | 0def0a1d7c28de6fd49995755de7b915cf701225 (diff) | |
download | gnutls-95c55c0eb57484533f4dd72c10481c66a66a53f2.tar.gz |
Initial merge attempt with gnutls_with_ext_mpi
Diffstat (limited to 'lib/debug.c')
-rw-r--r-- | lib/debug.c | 8 |
1 files changed, 5 insertions, 3 deletions
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); } |