diff options
author | Shane Lontis <shane.lontis@oracle.com> | 2021-03-09 10:14:45 +1000 |
---|---|---|
committer | Shane Lontis <shane.lontis@oracle.com> | 2021-03-18 17:52:37 +1000 |
commit | 4158b0dc1d73ce73b9a924b77205f4d2b67abdc1 (patch) | |
tree | f915fd1dcc71d716f0b93353dbb19af4dff052bc /crypto/rsa/rsa_lib.c | |
parent | 2858156e0309031da8476e51fe76f0ce8c15010f (diff) |
Add ossl_rsa symbols
Partial fix for #12964
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14473)
Diffstat (limited to 'crypto/rsa/rsa_lib.c')
-rw-r--r-- | crypto/rsa/rsa_lib.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/crypto/rsa/rsa_lib.c b/crypto/rsa/rsa_lib.c index dfc74ec951..89cd4da527 100644 --- a/crypto/rsa/rsa_lib.c +++ b/crypto/rsa/rsa_lib.c @@ -163,12 +163,12 @@ void RSA_free(RSA *r) BN_clear_free(r->iqmp); #if defined(FIPS_MODULE) && !defined(OPENSSL_NO_ACVP_TESTS) - rsa_acvp_test_free(r->acvp_test); + ossl_rsa_acvp_test_free(r->acvp_test); #endif #ifndef FIPS_MODULE RSA_PSS_PARAMS_free(r->pss); - sk_RSA_PRIME_INFO_pop_free(r->prime_infos, rsa_multip_info_free); + sk_RSA_PRIME_INFO_pop_free(r->prime_infos, ossl_rsa_multip_info_free); #endif BN_BLINDING_free(r->blinding); BN_BLINDING_free(r->mt_blinding); @@ -357,7 +357,7 @@ int RSA_security_bits(const RSA *rsa) /* This ought to mean that we have private key at hand. */ int ex_primes = sk_RSA_PRIME_INFO_num(rsa->prime_infos); - if (ex_primes <= 0 || (ex_primes + 2) > rsa_multip_cap(bits)) + if (ex_primes <= 0 || (ex_primes + 2) > ossl_rsa_multip_cap(bits)) return 0; } #endif @@ -469,7 +469,7 @@ int RSA_set0_multi_prime_params(RSA *r, BIGNUM *primes[], BIGNUM *exps[], old = r->prime_infos; for (i = 0; i < pnum; i++) { - pinfo = rsa_multip_info_new(); + pinfo = ossl_rsa_multip_info_new(); if (pinfo == NULL) goto err; if (primes[i] != NULL && exps[i] != NULL && coeffs[i] != NULL) { @@ -483,7 +483,7 @@ int RSA_set0_multi_prime_params(RSA *r, BIGNUM *primes[], BIGNUM *exps[], BN_set_flags(pinfo->d, BN_FLG_CONSTTIME); BN_set_flags(pinfo->t, BN_FLG_CONSTTIME); } else { - rsa_multip_info_free(pinfo); + ossl_rsa_multip_info_free(pinfo); goto err; } (void)sk_RSA_PRIME_INFO_push(prime_infos, pinfo); @@ -491,7 +491,7 @@ int RSA_set0_multi_prime_params(RSA *r, BIGNUM *primes[], BIGNUM *exps[], r->prime_infos = prime_infos; - if (!rsa_multip_calc_product(r)) { + if (!ossl_rsa_multip_calc_product(r)) { r->prime_infos = old; goto err; } @@ -503,7 +503,7 @@ int RSA_set0_multi_prime_params(RSA *r, BIGNUM *primes[], BIGNUM *exps[], * be freed in that case. So currently, stay consistent * with other *set0* functions: just free it... */ - sk_RSA_PRIME_INFO_pop_free(old, rsa_multip_info_free); + sk_RSA_PRIME_INFO_pop_free(old, ossl_rsa_multip_info_free); } r->version = RSA_ASN1_VERSION_MULTI; @@ -512,7 +512,7 @@ int RSA_set0_multi_prime_params(RSA *r, BIGNUM *primes[], BIGNUM *exps[], return 1; err: /* r, d, t should not be freed */ - sk_RSA_PRIME_INFO_pop_free(prime_infos, rsa_multip_info_free_ex); + sk_RSA_PRIME_INFO_pop_free(prime_infos, ossl_rsa_multip_info_free_ex); return 0; } #endif @@ -749,7 +749,7 @@ int ossl_rsa_set0_all_params(RSA *r, const STACK_OF(BIGNUM) *primes, if (!ossl_assert(prime != NULL && exp != NULL && coeff != NULL)) goto err; - /* Using rsa_multip_info_new() is wasteful, so allocate directly */ + /* Using ossl_rsa_multip_info_new() is wasteful, so allocate directly */ if ((pinfo = OPENSSL_zalloc(sizeof(*pinfo))) == NULL) { ERR_raise(ERR_LIB_RSA, ERR_R_MALLOC_FAILURE); goto err; @@ -766,7 +766,7 @@ int ossl_rsa_set0_all_params(RSA *r, const STACK_OF(BIGNUM) *primes, r->prime_infos = prime_infos; - if (!rsa_multip_calc_product(r)) { + if (!ossl_rsa_multip_calc_product(r)) { r->prime_infos = old_infos; goto err; } @@ -783,7 +783,7 @@ int ossl_rsa_set0_all_params(RSA *r, const STACK_OF(BIGNUM) *primes, * be freed in that case. So currently, stay consistent * with other *set0* functions: just free it... */ - sk_RSA_PRIME_INFO_pop_free(old_infos, rsa_multip_info_free); + sk_RSA_PRIME_INFO_pop_free(old_infos, ossl_rsa_multip_info_free); } #endif @@ -794,7 +794,7 @@ int ossl_rsa_set0_all_params(RSA *r, const STACK_OF(BIGNUM) *primes, #ifndef FIPS_MODULE err: /* r, d, t should not be freed */ - sk_RSA_PRIME_INFO_pop_free(prime_infos, rsa_multip_info_free_ex); + sk_RSA_PRIME_INFO_pop_free(prime_infos, ossl_rsa_multip_info_free_ex); return 0; #endif } |