From: Pauli Date: Tue, 25 May 2021 00:31:05 +0000 (+1000) Subject: bn: rename bn_check_prime_int -> ossl_bn_check_primt X-Git-Tag: openssl-3.0.0-beta1~366 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=36ec749fda0c24a8d850cde35ec7c56a999a457e;p=thirdparty%2Fopenssl.git bn: rename bn_check_prime_int -> ossl_bn_check_primt Reviewed-by: Shane Lontis (Merged from https://github.com/openssl/openssl/pull/15445) --- diff --git a/crypto/bn/bn_depr.c b/crypto/bn/bn_depr.c index 9d73cae98fd..09ff34d4a4d 100644 --- a/crypto/bn/bn_depr.c +++ b/crypto/bn/bn_depr.c @@ -49,7 +49,7 @@ int BN_is_prime(const BIGNUM *a, int checks, { BN_GENCB cb; BN_GENCB_set_old(&cb, callback, cb_arg); - return bn_check_prime_int(a, checks, ctx_passed, 0, &cb); + return ossl_bn_check_prime(a, checks, ctx_passed, 0, &cb); } int BN_is_prime_fasttest(const BIGNUM *a, int checks, @@ -59,5 +59,5 @@ int BN_is_prime_fasttest(const BIGNUM *a, int checks, { BN_GENCB cb; BN_GENCB_set_old(&cb, callback, cb_arg); - return bn_check_prime_int(a, checks, ctx_passed, do_trial_division, &cb); + return ossl_bn_check_prime(a, checks, ctx_passed, do_trial_division, &cb); } diff --git a/crypto/bn/bn_local.h b/crypto/bn/bn_local.h index 5a5829d73a7..d9e99772917 100644 --- a/crypto/bn/bn_local.h +++ b/crypto/bn/bn_local.h @@ -667,7 +667,7 @@ static ossl_inline BIGNUM *bn_expand(BIGNUM *a, int bits) return bn_expand2((a),(bits+BN_BITS2-1)/BN_BITS2); } -int bn_check_prime_int(const BIGNUM *w, int checks, BN_CTX *ctx, - int do_trial_division, BN_GENCB *cb); +int ossl_bn_check_prime(const BIGNUM *w, int checks, BN_CTX *ctx, + int do_trial_division, BN_GENCB *cb); #endif diff --git a/crypto/bn/bn_prime.c b/crypto/bn/bn_prime.c index 33a2c85129d..557f0381052 100644 --- a/crypto/bn/bn_prime.c +++ b/crypto/bn/bn_prime.c @@ -230,19 +230,19 @@ int BN_generate_prime_ex(BIGNUM *ret, int bits, int safe, int BN_is_prime_ex(const BIGNUM *a, int checks, BN_CTX *ctx_passed, BN_GENCB *cb) { - return bn_check_prime_int(a, checks, ctx_passed, 0, cb); + return ossl_bn_check_prime(a, checks, ctx_passed, 0, cb); } int BN_is_prime_fasttest_ex(const BIGNUM *w, int checks, BN_CTX *ctx, int do_trial_division, BN_GENCB *cb) { - return bn_check_prime_int(w, checks, ctx, do_trial_division, cb); + return ossl_bn_check_prime(w, checks, ctx, do_trial_division, cb); } #endif /* Wrapper around bn_is_prime_int that sets the minimum number of checks */ -int bn_check_prime_int(const BIGNUM *w, int checks, BN_CTX *ctx, - int do_trial_division, BN_GENCB *cb) +int ossl_bn_check_prime(const BIGNUM *w, int checks, BN_CTX *ctx, + int do_trial_division, BN_GENCB *cb) { int min_checks = bn_mr_min_checks(BN_num_bits(w)); @@ -254,7 +254,7 @@ int bn_check_prime_int(const BIGNUM *w, int checks, BN_CTX *ctx, int BN_check_prime(const BIGNUM *p, BN_CTX *ctx, BN_GENCB *cb) { - return bn_check_prime_int(p, 0, ctx, 1, cb); + return ossl_bn_check_prime(p, 0, ctx, 1, cb); } /*