-/* crypto/bn/exptest.c */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
#include <openssl/rand.h>
#include <openssl/err.h>
-#define NUM_BITS (BN_BITS*2)
+#define NUM_BITS (BN_BITS2 * 4)
static const char rnd_seed[] =
"string to make the random number generator think it has entropy";
* don't even check its return
* value (which we should) */
- ERR_load_BN_strings();
-
ctx = BN_CTX_new();
if (ctx == NULL)
EXIT(1);
BN_free(b);
BN_free(m);
BN_CTX_free(ctx);
- ERR_remove_thread_state(NULL);
- CRYPTO_mem_leaks(out);
+
+#ifndef OPENSSL_NO_CRYPTO_MDEBUG
+ if (CRYPTO_mem_leaks(out) <= 0)
+ goto err;
+#endif
BIO_free(out);
printf("\n");
EXIT(0);
err:
- ERR_load_crypto_strings();
ERR_print_errors(out);
#ifdef OPENSSL_SYS_NETWARE
printf("ERROR\n");