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);
/* 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
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) {
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);
r->prime_infos = prime_infos;
- if (!rsa_multip_calc_product(r)) {
+ if (!ossl_rsa_multip_calc_product(r)) {
r->prime_infos = old;
goto err;
}
* 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;
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
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;
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;
}
* 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
#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
}