bn/asm/rsaz-avx2.pl: constant-time gather procedure.
[openssl.git] / test / dsatest.c
index 81c36cb48afd0c80f17f6fc6ec599b9253fab5b7..b53ee471dfbb9152dda46a21690520f2720f1604 100644 (file)
@@ -1,4 +1,3 @@
-/* crypto/dsa/dsatest.c */
 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
  * All rights reserved.
  *
@@ -141,7 +140,6 @@ int main(int argc, char **argv)
     CRYPTO_set_mem_debug(1);
     CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON);
 
-    ERR_load_crypto_strings();
     RAND_seed(rnd_seed, sizeof rnd_seed);
 
     BIO_printf(bio_err, "test generation of DSA parameters\n");
@@ -212,11 +210,10 @@ int main(int argc, char **argv)
         ERR_print_errors(bio_err);
     DSA_free(dsa);
     BN_GENCB_free(cb);
-    CRYPTO_cleanup_all_ex_data();
-    ERR_remove_thread_state(NULL);
-    ERR_free_strings();
-#ifdef CRYPTO_MDEBUG
-    CRYPTO_mem_leaks(bio_err);
+
+#ifndef OPENSSL_NO_CRYPTO_MDEBUG
+    if (CRYPTO_mem_leaks(bio_err) <= 0)
+        ret = 0;
 #endif
     BIO_free(bio_err);
     bio_err = NULL;
@@ -248,7 +245,7 @@ static int dsa_cb(int p, int n, BN_GENCB *arg)
     (void)BIO_flush(BN_GENCB_get_arg(arg));
 
     if (!ok && (p == 0) && (num > 1)) {
-        BIO_printf((BIO *)arg, "error in dsatest\n");
+        BIO_printf(BN_GENCB_get_arg(arg), "error in dsatest\n");
         return 0;
     }
     return 1;