aboutsummaryrefslogtreecommitdiff
path: root/src/util/crypto.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-05-18 18:52:52 +0200
committerChristian Grothoff <christian@grothoff.org>2015-05-18 18:52:52 +0200
commitcb68cc7e5b03a03f335e121def044034978adf17 (patch)
tree6fd60bb4f7a8f676db711e13363c4b166952cb5c /src/util/crypto.c
parentd5960b50af4aa7f1faaa1d013cb1a142d258cc36 (diff)
fix reporting in constructor
Diffstat (limited to 'src/util/crypto.c')
-rw-r--r--src/util/crypto.c13
1 files changed, 9 insertions, 4 deletions
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);