summaryrefslogtreecommitdiff
path: root/lib/libcrypto/bn/bn_prime.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libcrypto/bn/bn_prime.c')
-rw-r--r--lib/libcrypto/bn/bn_prime.c57
1 files changed, 1 insertions, 56 deletions
diff --git a/lib/libcrypto/bn/bn_prime.c b/lib/libcrypto/bn/bn_prime.c
index 6e46a3912ca..c2fd0fc2e9f 100644
--- a/lib/libcrypto/bn/bn_prime.c
+++ b/lib/libcrypto/bn/bn_prime.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bn_prime.c,v 1.30 2023/01/28 17:13:26 jsing Exp $ */
+/* $OpenBSD: bn_prime.c,v 1.31 2023/04/25 19:57:59 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -151,35 +151,6 @@ BN_GENCB_call(BN_GENCB *cb, int a, int b)
return 0;
}
-#ifndef OPENSSL_NO_DEPRECATED
-BIGNUM *
-BN_generate_prime(BIGNUM *ret, int bits, int safe, const BIGNUM *add,
- const BIGNUM *rem, void (*callback)(int, int, void *), void *cb_arg)
-{
- BN_GENCB cb;
- BIGNUM *rnd = NULL;
- int found = 0;
-
- BN_GENCB_set_old(&cb, callback, cb_arg);
-
- if (ret == NULL) {
- if ((rnd = BN_new()) == NULL)
- goto err;
- } else
- rnd = ret;
- if (!BN_generate_prime_ex(rnd, bits, safe, add, rem, &cb))
- goto err;
-
- /* we have a prime :-) */
- found = 1;
-
-err:
- if (!found && (ret == NULL) && (rnd != NULL))
- BN_free(rnd);
- return (found ? rnd : NULL);
-}
-#endif
-
int
BN_generate_prime_ex(BIGNUM *ret, int bits, int safe, const BIGNUM *add,
const BIGNUM *rem, BN_GENCB *cb)
@@ -260,38 +231,12 @@ BN_generate_prime_ex(BIGNUM *ret, int bits, int safe, const BIGNUM *add,
return found;
}
-#ifndef OPENSSL_NO_DEPRECATED
-int
-BN_is_prime(const BIGNUM *a, int checks, void (*callback)(int, int, void *),
- BN_CTX *ctx_passed, void *cb_arg)
-{
- BN_GENCB cb;
-
- BN_GENCB_set_old(&cb, callback, cb_arg);
- return BN_is_prime_ex(a, checks, ctx_passed, &cb);
-}
-#endif
-
int
BN_is_prime_ex(const BIGNUM *a, int checks, BN_CTX *ctx_passed, BN_GENCB *cb)
{
return BN_is_prime_fasttest_ex(a, checks, ctx_passed, 0, cb);
}
-#ifndef OPENSSL_NO_DEPRECATED
-int
-BN_is_prime_fasttest(const BIGNUM *a, int checks,
- void (*callback)(int, int, void *), BN_CTX *ctx_passed, void *cb_arg,
- int do_trial_division)
-{
- BN_GENCB cb;
-
- BN_GENCB_set_old(&cb, callback, cb_arg);
- return BN_is_prime_fasttest_ex(a, checks, ctx_passed,
- do_trial_division, &cb);
-}
-#endif
-
int
BN_is_prime_fasttest_ex(const BIGNUM *a, int checks, BN_CTX *ctx_passed,
int do_trial_division, BN_GENCB *cb)