aboutsummaryrefslogtreecommitdiff
path: root/src/util/crypto.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-03-01 13:13:33 +0100
committerChristian Grothoff <christian@grothoff.org>2020-03-01 13:13:33 +0100
commitf979ee9acaa69bfb26973db43c1c82f704f6b01d (patch)
treec04dede1a244ebd75ad789b6d54afea5f29b8a10 /src/util/crypto.c
parentd11a13c825a169e3cc42efa8dca679c14e627d40 (diff)
add ENABLE_SANITY_CHECKS #define instead of using '1'
Diffstat (limited to 'src/util/crypto.c')
-rw-r--r--src/util/crypto.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/util/crypto.c b/src/util/crypto.c
index e847633fe..3544fdcc4 100644
--- a/src/util/crypto.c
+++ b/src/util/crypto.c
@@ -62,7 +62,8 @@ TALER_gcrypt_init ()
"libgcrypt version mismatch\n");
abort ();
}
- /* Disable secure memory. */
+ /* Disable secure memory (we should never run on a system that
+ even uses swap space for memory). */
gcry_control (GCRYCTL_DISABLE_SECMEM, 0);
gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0);
}
@@ -83,8 +84,7 @@ TALER_test_coin_valid (const struct TALER_CoinPublicInfo *coin_public_info,
const struct TALER_DenominationPublicKey *denom_pub)
{
struct GNUNET_HashCode c_hash;
-#if 1 /* sanity check of invariant, could probably be disabled in production
- for slightly more performance */
+#if ENABLE_SANITY_CHECKS
struct GNUNET_HashCode d_hash;
GNUNET_CRYPTO_rsa_public_key_hash (denom_pub->rsa_public_key,