Lines Matching +full:oss +full:- +full:fuzz +full:- +full:project +full:- +full:name

2  * Copyright 1995-2022 The OpenSSL Project Authors. All Rights Reserved.
29 const char *name; member
47 static int p0[] = { 163, 7, 6, 3, 0, -1 };
48 static int p1[] = { 193, 15, 0, -1 };
56 int i = s->numpairs; in findattr()
57 PAIR *pp = s->pairs; in findattr()
59 for ( ; --i >= 0; pp++) in findattr()
60 if (OPENSSL_strcasecmp(pp->key, key) == 0) in findattr()
61 return pp->value; in findattr()
66 * Parse BIGNUM from sparse hex-strings, return |BN_hex2bn| result.
98 TEST_error("%s:%d: Can't find %s", s->test_file, s->start, attribute); in getBN()
238 if (!TEST_true(BN_bntest_rand(b, 400 + i - NUM1, 0, 0))) in test_sub()
279 if (!(TEST_true(BN_bntest_rand(b, 50 + 3 * (i - NUM1), 0, 0)))) in test_div_recip()
307 { -10, 3, -3, -1 },
308 { 10, -3, -3, 1 },
309 { -10, -3, 3, -1 },
318 if (!BN_set_word(bn, value < 0 ? -value : value)) { in set_signed_bn()
450 * Test constant-time modular exponentiation with 1024-bit inputs, which on
601 * rsaz_1024_mul_avx2 expects fully-reduced inputs. in test_modexp_mont5()
628 * mips-linux-gnu and mipsel-linux-gnu 32bit targets. in test_modexp_mont5()
894 /* Test that a non-sensical, too small value causes a failure */ in test_gf2m_modinv()
1132 * congruent to $a^{(b-1)/2}$, modulo $b$ (Legendre symbol). So we in test_kronecker()
1134 * random a's. (That is, we run the Solovay-Strassen primality test to in test_kronecker()
1148 /* t := (|b|-1)/2 (note that b is odd) */ in test_kronecker()
1174 legendre = -1; in test_kronecker()
1177 if (!TEST_int_ge(kronecker = BN_kronecker(a, b, ctx), -1)) in test_kronecker()
1181 kronecker = -kronecker; in test_kronecker()
1211 || !equalBN("Sum - A", b, ret) in file_sum()
1213 || !equalBN("Sum - B", a, ret)) in file_sum()
1229 || !equalBN("Sum - A (r is a)", b, ret) in file_sum()
1232 || !equalBN("Sum - A (r is b)", b, ret) in file_sum()
1235 || !equalBN("Sum - B (r is a)", a, ret) in file_sum()
1238 || !equalBN("Sum - B (r is b)", a, ret)) in file_sum()
1251 || !equalBN("Sum -u A", b, ret) in file_sum()
1253 || !equalBN("Sum -u B", a, ret)) in file_sum()
1269 || !equalBN("Sum -u A (r is a)", b, ret) in file_sum()
1272 || !equalBN("Sum -u A (r is b)", b, ret) in file_sum()
1275 || !equalBN("Sum -u B (r is a)", a, ret) in file_sum()
1278 || !equalBN("Sum -u B (r is b)", a, ret)) in file_sum()
1286 if (!BN_is_negative(b) && b_word != (BN_ULONG)-1) { in file_sum()
1292 || !equalBN("Sum - B (word)", a, ret)) in file_sum()
1441 /* BN_sqrt should fail on non-squares and negative numbers. */ in file_square()
1538 if (!BN_is_negative(b) && b_word != (BN_ULONG)-1) { in file_quotient()
1541 assert(remainder_word != (BN_ULONG)-1); in file_quotient()
1577 || !equalBN("A % B (non-negative)", nnmod, ret)) in file_quotient()
1801 memset(out, -1, sizeof(out)); in test_bn2padded()
1809 for (bytes = 128 - 7; bytes <= 128; bytes++) { in test_bn2padded()
1818 if (!TEST_int_eq(BN_bn2binpad(n, NULL, 0), -1)) in test_bn2padded()
1821 if (!TEST_int_eq(BN_bn2binpad(n, out, bytes - 1), -1)) in test_bn2padded()
1834 || !TEST_mem_eq(out + sizeof(out) - bytes, bytes, in test_bn2padded()
1836 || !TEST_mem_eq(out, sizeof(out) - bytes, in test_bn2padded()
1837 zeros, sizeof(out) - bytes)) in test_bn2padded()
1872 if (!TEST_int_eq(parsedecBN(&bn, "-42"), 3) in test_dec2bn()
1893 if (!TEST_int_eq(parsedecBN(&bn, "-0"), 2) in test_dec2bn()
1939 if (!TEST_int_eq(parseBN(&bn, "-42"), 3) in test_hex2bn()
1959 if (!TEST_int_eq(parseBN(&bn, "-0"), 2) in test_hex2bn()
2000 if (!TEST_true(BN_asc2bn(&bn, "-42")) in test_asc2bn()
2015 if (!TEST_true(BN_asc2bn(&bn, "-0xabcd")) in test_asc2bn()
2020 if (!TEST_true(BN_asc2bn(&bn, "-0")) in test_asc2bn()
2039 {"-1", "\x00\x00\x00\x01\x81", 5},
2042 {"-256", "\x00\x00\x00\x02\x81\x00", 6},
2055 || !TEST_true(BN_asc2bn(&bn, test->base10))) in test_mpi()
2062 || !TEST_mem_eq(test->mpi, test->mpi_len, scratch, mpi_len)) in test_mpi()
2094 || !TEST_true(BN_rand(bn, 1, -1 /* top */ , 1 /* bottom */ )) in test_rand()
2153 const double delta = counts[i] - expected; in test_rand_range_single()
2387 /* Repeat for r = 1 ^ 0 mod -1 */ in test_expmodone()
2475 static int not_primes[] = { -1, 0, 1, 4 };
2540 /*- in test_ctx_consttime_flag()
2541 * The constant-time flag should not "leak" among BN_CTX frames: in test_ctx_consttime_flag()
2543 * - test_ctx_set_ct_flag() starts a frame in the given BN_CTX and in test_ctx_consttime_flag()
2546 * - test_ctx_check_ct_flag() then starts a new frame and gets a in test_ctx_consttime_flag()
2621 /* original test vectors for rsaz_512_sqr bug, by OSS-Fuzz */
2831 || !TEST_true(BN_dec2bn(&base, test->base)) in test_mod_exp()
2832 || !TEST_true(BN_dec2bn(&exponent, test->exp)) in test_mod_exp()
2833 || !TEST_true(BN_dec2bn(&modulo, test->mod))) in test_mod_exp()
2842 if (!TEST_mem_eq(s, strlen(s), test->res, strlen(test->res))) in test_mod_exp()
2865 || !TEST_true(BN_dec2bn(&base, test->base)) in test_mod_exp_consttime()
2866 || !TEST_true(BN_dec2bn(&exponent, test->exp)) in test_mod_exp_consttime()
2867 || !TEST_true(BN_dec2bn(&modulo, test->mod))) in test_mod_exp_consttime()
2880 if (!TEST_mem_eq(s, strlen(s), test->res, strlen(test->res))) in test_mod_exp_consttime()
3059 for ( ; --numtests >= 0; tp++) { in file_test_run()
3060 if (findattr(s, tp->name) != NULL) { in file_test_run()
3061 if (!tp->func(s)) { in file_test_run()
3063 s->test_file, s->start, tp->name); in file_test_run()
3069 TEST_info("%s:%d: Unknown test", s->test_file, s->start); in file_test_run()
3087 while (!BIO_eof(s->fp) && test_readstanza(s)) { in run_file_tests()
3088 if (s->numpairs == 0) in run_file_tests()
3091 s->errors++; in run_file_tests()
3092 s->numtests++; in run_file_tests()
3096 c = s->errors; in run_file_tests()
3103 OPT_ERR = -1,
3113 { "stochastic", OPT_STOCHASTIC_TESTS, '-', "Run stochastic tests" }, in test_get_options()
3114 { OPT_HELP_STR, 1, '-', in test_get_options()