2005-04-17 07:37:13 -04:00
|
|
|
#include <tomcrypt_test.h>
|
|
|
|
|
|
|
|
int main(void)
|
|
|
|
{
|
2005-06-08 20:08:13 -04:00
|
|
|
int x;
|
2005-04-17 07:37:13 -04:00
|
|
|
reg_algs();
|
2005-08-01 12:36:47 -04:00
|
|
|
|
|
|
|
#ifdef USE_LTM
|
|
|
|
ltc_mp = ltm_desc;
|
|
|
|
#elif defined(USE_TFM)
|
|
|
|
ltc_mp = tfm_desc;
|
2006-04-06 15:48:32 -04:00
|
|
|
#elif defined(USE_GMP)
|
|
|
|
ltc_mp = gmp_desc;
|
2005-08-01 12:36:47 -04:00
|
|
|
#else
|
|
|
|
extern ltc_math_descriptor EXT_MATH_LIB;
|
|
|
|
ltc_mp = EXT_MATH_LIB;
|
|
|
|
#endif
|
|
|
|
|
2005-04-17 07:37:13 -04:00
|
|
|
printf("build == \n%s\n", crypt_build_settings);
|
2005-06-08 20:08:13 -04:00
|
|
|
printf("\nstore_test...."); fflush(stdout); x = store_test(); printf(x ? "failed" : "passed");if (x) exit(EXIT_FAILURE);
|
2014-04-29 19:10:22 -04:00
|
|
|
printf("\nmisc_test....."); fflush(stdout); x = misc_test(); printf(x ? "failed" : "passed");if (x) exit(EXIT_FAILURE);
|
2005-06-08 20:08:13 -04:00
|
|
|
printf("\ncipher_test..."); fflush(stdout); x = cipher_hash_test(); printf(x ? "failed" : "passed");if (x) exit(EXIT_FAILURE);
|
2014-04-03 09:08:17 -04:00
|
|
|
printf("\nmac_test......"); fflush(stdout); x = mac_test(); printf(x ? "failed" : "passed");if (x) exit(EXIT_FAILURE);
|
2005-06-08 20:08:13 -04:00
|
|
|
printf("\nmodes_test...."); fflush(stdout); x = modes_test(); printf(x ? "failed" : "passed");if (x) exit(EXIT_FAILURE);
|
|
|
|
printf("\nder_test......"); fflush(stdout); x = der_tests(); printf(x ? "failed" : "passed");if (x) exit(EXIT_FAILURE);
|
|
|
|
printf("\npkcs_1_test..."); fflush(stdout); x = pkcs_1_test(); printf(x ? "failed" : "passed");if (x) exit(EXIT_FAILURE);
|
2014-08-05 11:21:02 -04:00
|
|
|
printf("\npkcs_1_pss_test...."); fflush(stdout); x = pkcs_1_pss_test(); printf(x ? "failed" : "passed");if (x) exit(EXIT_FAILURE);
|
2014-08-05 13:15:14 -04:00
|
|
|
printf("\npkcs_1_oaep_test...."); fflush(stdout); x = pkcs_1_oaep_test(); printf(x ? "failed" : "passed");if (x) exit(EXIT_FAILURE);
|
2014-08-05 17:48:35 -04:00
|
|
|
printf("\npkcs_1_emsa_test...."); fflush(stdout); x = pkcs_1_emsa_test(); printf(x ? "failed" : "passed");if (x) exit(EXIT_FAILURE);
|
2014-08-05 18:58:45 -04:00
|
|
|
printf("\npkcs_1_eme_test...."); fflush(stdout); x = pkcs_1_eme_test(); printf(x ? "failed" : "passed");if (x) exit(EXIT_FAILURE);
|
2005-06-08 20:08:13 -04:00
|
|
|
printf("\nrsa_test......"); fflush(stdout); x = rsa_test(); printf(x ? "failed" : "passed");if (x) exit(EXIT_FAILURE);
|
2011-01-18 14:06:03 -05:00
|
|
|
printf("\ndh_test......."); fflush(stdout); x = dh_test(); printf(x ? "failed" : "passed");if (x) exit(EXIT_FAILURE);
|
2012-11-22 21:04:50 -05:00
|
|
|
printf("\necc_test......"); fflush(stdout); x = ecc_tests(); printf(x ? "failed" : "passed");if (x) exit(EXIT_FAILURE);
|
2005-06-08 20:08:13 -04:00
|
|
|
printf("\ndsa_test......"); fflush(stdout); x = dsa_test(); printf(x ? "failed" : "passed");if (x) exit(EXIT_FAILURE);
|
2005-11-18 00:15:37 -05:00
|
|
|
printf("\nkatja_test...."); fflush(stdout); x = katja_test(); printf(x ? "failed" : "passed");if (x) exit(EXIT_FAILURE);
|
2005-06-08 20:08:13 -04:00
|
|
|
printf("\n");
|
2005-04-17 07:37:13 -04:00
|
|
|
return EXIT_SUCCESS;
|
|
|
|
}
|
2005-06-08 20:08:13 -04:00
|
|
|
|
|
|
|
/* $Source$ */
|
|
|
|
/* $Revision$ */
|
|
|
|
/* $Date$ */
|