Commit 2c5fadbc authored by Nils Larsch's avatar Nils Larsch
Browse files

2 is a prime

PR: 1266
parent 58ece833
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -258,7 +258,8 @@ int BN_is_prime_fasttest_ex(const BIGNUM *a, int checks, BN_CTX *ctx_passed,

	/* first look for small factors */
	if (!BN_is_odd(a))
		return 0;
		/* a is even => a is prime if and only if a == 2 */
		return BN_is_word(a, 2);
	if (do_trial_division)
		{
		for (i = 1; i < NUMPRIMES; i++)