From cb68cc7e5b03a03f335e121def044034978adf17 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 18 May 2015 18:52:52 +0200 Subject: fix reporting in constructor --- src/util/crypto.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/util/crypto.c b/src/util/crypto.c index 529caa930..562377e37 100644 --- a/src/util/crypto.c +++ b/src/util/crypto.c @@ -40,8 +40,9 @@ fatal_error_handler (void *cls, int wtf, const char *msg) { - TALER_LOG_ERROR ("Fatal error in libgcrypt: %s\n", - msg); + fprintf (stderr, + "Fatal error in libgcrypt: %s\n", + msg); abort(); } @@ -54,8 +55,12 @@ TALER_gcrypt_init () { gcry_set_fatalerror_handler (&fatal_error_handler, NULL); - TALER_assert_as (gcry_check_version (NEED_LIBGCRYPT_VERSION), - "libgcrypt version mismatch"); + if (! gcry_check_version (NEED_LIBGCRYPT_VERSION)) + { + fprintf (stderr, + "libgcrypt version mismatch\n"); + abort (); + } /* Disable secure memory. */ gcry_control (GCRYCTL_DISABLE_SECMEM, 0); gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0); -- cgit v1.2.3