diff options
author | Theo Buehler <tb@cvs.openbsd.org> | 2022-07-29 08:37:34 +0000 |
---|---|---|
committer | Theo Buehler <tb@cvs.openbsd.org> | 2022-07-29 08:37:34 +0000 |
commit | 16d931452eb17b54fe29df1be47fb0a04d22e045 (patch) | |
tree | b59c7137d5d73a101989f49e934f9226aa076190 /lib/libcrypto | |
parent | bfaac420ed03d97c6d46ea195c7017f874102c05 (diff) |
Having a perfect square at this point is not an error. Rather it is
a shortcut bypassing expensive computation, so change goto err to
goto done. Bug introduced in last refactoring before commit.
Diffstat (limited to 'lib/libcrypto')
-rw-r--r-- | lib/libcrypto/bn/bn_bpsw.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libcrypto/bn/bn_bpsw.c b/lib/libcrypto/bn/bn_bpsw.c index ef3b829cad2..93d43afff3f 100644 --- a/lib/libcrypto/bn/bn_bpsw.c +++ b/lib/libcrypto/bn/bn_bpsw.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bn_bpsw.c,v 1.4 2022/07/29 08:32:20 tb Exp $ */ +/* $OpenBSD: bn_bpsw.c,v 1.5 2022/07/29 08:37:33 tb Exp $ */ /* * Copyright (c) 2022 Martin Grenouilloux <martin.grenouilloux@lse.epita.fr> * Copyright (c) 2022 Theo Buehler <tb@openbsd.org> @@ -248,7 +248,7 @@ bn_strong_lucas_selfridge(int *is_prime, const BIGNUM *n, BN_CTX *ctx) goto err; if (is_perfect_square) { *is_prime = 0; - goto err; + goto done; } /* |