summaryrefslogtreecommitdiff
path: root/src/mpi.h
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2013-09-07 10:06:46 +0200
committerWerner Koch <wk@gnupg.org>2013-09-11 17:36:34 +0200
commite35ed615acc624a8b6c07576ea0650aac2bdb0db (patch)
tree7c90aa5c5dbf091108ca749f5fc8220583bba8e0 /src/mpi.h
parentf3bca0c77c4979504f95fdbc618f7458e61e3e45 (diff)
downloadlibgcrypt-e35ed615acc624a8b6c07576ea0650aac2bdb0db.tar.gz
Streamline the use of the internal mpi and hex debug functions.
* mpi/mpicoder.c (gcry_mpi_dump): Remove. (_gcry_log_mpidump): Remove. * src/misc.c (_gcry_log_printhex): Factor all code out to ... (do_printhex): new. Add line wrapping a and compact printing. (_gcry_log_printmpi): New. * src/mpi.h (log_mpidump): Remove macro. * src/g10lib.h (log_mpidump): Add compatibility macro. (log_printmpi): New macro * src/visibility.c (gcry_mpi_dump): Call _gcry_log_printmpi. * cipher/primegen.c (prime_generate_internal): Replace gcry_mpi_dump by log_printmpi. (gcry_prime_group_generator): Ditto. * cipher/pubkey.c: Remove extra colons from log_mpidump call. * cipher/rsa.c (stronger_key_check): Use log_printmpi. -- The values to debug get longer and longer and the different debug functions made it hard to check them out. Now MPIs and hex buffers are printed very similar. Lines may now wrap with an backslash as indicator. MPIs are distinguished from plain buffers in the output by always using a sign. Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'src/mpi.h')
-rw-r--r--src/mpi.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/mpi.h b/src/mpi.h
index 6406112a..13d843a0 100644
--- a/src/mpi.h
+++ b/src/mpi.h
@@ -163,8 +163,6 @@ byte *_gcry_mpi_get_secure_buffer( gcry_mpi_t a, unsigned *nbytes, int *sign );
void _gcry_mpi_set_buffer ( gcry_mpi_t a, const void *buffer,
unsigned int nbytes, int sign );
-#define log_mpidump _gcry_log_mpidump
-
/*-- mpi-add.c --*/
#define mpi_add_ui(w,u,v) gcry_mpi_add_ui((w),(u),(v))
#define mpi_add(w,u,v) gcry_mpi_add ((w),(u),(v))