int main(int argc, char *argv[]) { if (argc == 2) { /* Test only the algorithms we use */ int i; for (i = 0; i < ARRAY_SIZE(test_perms); i++) { if (test_permutation(test_perms[i].signing_algorithm, test_perms[i].data_key_algorithm, argv[1])) return 1; } } else if (argc == 3 && !strcasecmp(argv[2], "--all")) { /* Test all the algorithms */ int sign_alg, data_alg; for (sign_alg = 0; sign_alg < VB2_ALG_COUNT; sign_alg++) { for (data_alg = 0; data_alg < VB2_ALG_COUNT; data_alg++) { if (test_permutation(sign_alg, data_alg, argv[1])) return 1; } } } else { fprintf(stderr, "Usage: %s <keys_dir> [--all]", argv[0]); return -1; } return gTestSuccess ? 0 : 255; }
int main(){ test_permutation(); return 0;}