Lines Matching refs:rsa
81 RSA *rsa; in rsa_newdata() local
86 rsa = ossl_rsa_new_with_ctx(libctx); in rsa_newdata()
87 if (rsa != NULL) { in rsa_newdata()
88 RSA_clear_flags(rsa, RSA_FLAG_TYPE_MASK); in rsa_newdata()
89 RSA_set_flags(rsa, RSA_FLAG_TYPE_RSA); in rsa_newdata()
91 return rsa; in rsa_newdata()
97 RSA *rsa; in rsapss_newdata() local
102 rsa = ossl_rsa_new_with_ctx(libctx); in rsapss_newdata()
103 if (rsa != NULL) { in rsapss_newdata()
104 RSA_clear_flags(rsa, RSA_FLAG_TYPE_MASK); in rsapss_newdata()
105 RSA_set_flags(rsa, RSA_FLAG_TYPE_RSASSAPSS); in rsapss_newdata()
107 return rsa; in rsapss_newdata()
117 const RSA *rsa = keydata; in rsa_has() local
120 if (rsa == NULL || !ossl_prov_is_running()) in rsa_has()
127 ok = ok && (RSA_get0_n(rsa) != NULL); in rsa_has()
129 ok = ok && (RSA_get0_e(rsa) != NULL); in rsa_has()
131 ok = ok && (RSA_get0_d(rsa) != NULL); in rsa_has()
175 RSA *rsa = keydata; in rsa_import() local
180 if (!ossl_prov_is_running() || rsa == NULL) in rsa_import()
186 rsa_type = RSA_test_flags(rsa, RSA_FLAG_TYPE_MASK); in rsa_import()
189 ok = ok && pss_params_fromdata(ossl_rsa_get0_pss_params_30(rsa), in rsa_import()
192 ossl_rsa_get0_libctx(rsa)); in rsa_import()
197 ok = ok && ossl_rsa_fromdata(rsa, params, include_private); in rsa_import()
206 RSA *rsa = keydata; in rsa_export() local
207 const RSA_PSS_PARAMS_30 *pss_params = ossl_rsa_get0_pss_params_30(rsa); in rsa_export()
212 if (!ossl_prov_is_running() || rsa == NULL) in rsa_export()
229 ok = ok && ossl_rsa_todata(rsa, tmpl, NULL, include_private); in rsa_export()
332 RSA *rsa = key; in rsa_get_params() local
333 const RSA_PSS_PARAMS_30 *pss_params = ossl_rsa_get0_pss_params_30(rsa); in rsa_get_params()
334 int rsa_type = RSA_test_flags(rsa, RSA_FLAG_TYPE_MASK); in rsa_get_params()
336 int empty = RSA_get0_n(rsa) == NULL; in rsa_get_params()
339 && (empty || !OSSL_PARAM_set_int(p, RSA_bits(rsa)))) in rsa_get_params()
342 && (empty || !OSSL_PARAM_set_int(p, RSA_security_bits(rsa)))) in rsa_get_params()
345 && (empty || !OSSL_PARAM_set_int(p, RSA_size(rsa)))) in rsa_get_params()
375 && ossl_rsa_todata(rsa, NULL, params, 1); in rsa_get_params()
394 const RSA *rsa = keydata; in rsa_validate() local
406 ok = ok && ossl_rsa_validate_pairwise(rsa); in rsa_validate()
409 ok = ok && ossl_rsa_validate_private(rsa); in rsa_validate()
411 ok = ok && ossl_rsa_validate_public(rsa); in rsa_validate()
580 RSA *rsa = NULL, *rsa_tmp = NULL; in rsa_gen() local
631 rsa = rsa_tmp; in rsa_gen()
636 return rsa; in rsa_gen()
656 RSA *rsa = NULL; in common_load() local
658 if (ossl_prov_is_running() && reference_sz == sizeof(rsa)) { in common_load()
660 rsa = *(RSA **)reference; in common_load()
662 if (RSA_test_flags(rsa, RSA_FLAG_TYPE_MASK) != expected_rsa_type) in common_load()
667 return rsa; in common_load()