EVP_PKEY_RSA
case EVP_PKEY_RSA:
if (EVP_PKEY_base_id(evp) == EVP_PKEY_RSA) {
if ((ctx = EVP_PKEY_CTX_new_id(EVP_PKEY_RSA, NULL)) == NULL) {
if (EVP_PKEY_base_id(pk) == EVP_PKEY_RSA &&
case EVP_PKEY_RSA:
case EVP_PKEY_RSA:
st = (rsa_key = d2i_PrivateKey(EVP_PKEY_RSA, NULL, &p,
keytype = EVP_PKEY_RSA;
case EVP_PKEY_RSA:
case EVP_PKEY_RSA:
if (EVP_PKEY_get_base_id(ctx->p2) != EVP_PKEY_RSA
if (EVP_PKEY_get_base_id(ctx->p2) != EVP_PKEY_RSA
if (EVP_PKEY_get_base_id(ctx->p2) != EVP_PKEY_RSA
if (EVP_PKEY_get_base_id(ctx->p2) != EVP_PKEY_RSA \
if (EVP_PKEY_get_base_id(ctx->p2) != EVP_PKEY_RSA \
if (EVP_PKEY_get_base_id(ctx->p2) != EVP_PKEY_RSA \
{ OSSL_ACTION_SET, EVP_PKEY_RSA, EVP_PKEY_RSA_PSS,
{ OSSL_ACTION_GET, EVP_PKEY_RSA, EVP_PKEY_RSA_PSS,
{ OSSL_ACTION_SET, EVP_PKEY_RSA, EVP_PKEY_RSA_PSS,
{ OSSL_ACTION_GET, EVP_PKEY_RSA, EVP_PKEY_RSA_PSS,
{ OSSL_ACTION_SET, EVP_PKEY_RSA, EVP_PKEY_RSA_PSS, EVP_PKEY_OP_TYPE_SIG,
{ OSSL_ACTION_GET, EVP_PKEY_RSA, EVP_PKEY_RSA_PSS, EVP_PKEY_OP_TYPE_SIG,
{ OSSL_ACTION_SET, EVP_PKEY_RSA, 0, EVP_PKEY_OP_TYPE_CRYPT,
{ OSSL_ACTION_GET, EVP_PKEY_RSA, 0, EVP_PKEY_OP_TYPE_CRYPT,
{ OSSL_ACTION_SET, EVP_PKEY_RSA, 0, EVP_PKEY_OP_TYPE_CRYPT,
{ OSSL_ACTION_GET, EVP_PKEY_RSA, 0, EVP_PKEY_OP_TYPE_CRYPT,
{ OSSL_ACTION_SET, EVP_PKEY_RSA, 0, EVP_PKEY_OP_TYPE_CRYPT,
{ OSSL_ACTION_SET, EVP_PKEY_RSA, EVP_PKEY_RSA_PSS, EVP_PKEY_OP_KEYGEN,
{ OSSL_ACTION_SET, EVP_PKEY_RSA, EVP_PKEY_RSA_PSS, EVP_PKEY_OP_KEYGEN,
{ OSSL_ACTION_SET, EVP_PKEY_RSA, EVP_PKEY_RSA_PSS, EVP_PKEY_OP_KEYGEN,
if (EVP_PKEY_get_id(priv) != EVP_PKEY_RSA) {
if (EVP_PKEY_get_id(pubk) != EVP_PKEY_RSA) {
if (pkey->type != EVP_PKEY_RSA && pkey->type != EVP_PKEY_RSA_PSS) {
{ EVP_PKEY_RSA, "RSA" },
case EVP_PKEY_RSA:
case EVP_PKEY_RSA:
if (EVP_PKEY_get_id(pk) == EVP_PKEY_RSA)
case EVP_PKEY_RSA:
(isdss == 0 ? EVP_PKEY_RSA : isdss == 1 ? EVP_PKEY_DSA \
if (!ossl_assert(evp_type == EVP_PKEY_RSA || evp_type == EVP_PKEY_DSA)) {
case EVP_PKEY_RSA:
EVP_PKEY_RSA,
case EVP_PKEY_RSA:
{ EVP_PKEY_RSA,
EVP_PKEY_RSA,
case EVP_PKEY_RSA:
return EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_RSA, EVP_PKEY_OP_TYPE_CRYPT,
return int_set_rsa_md_name(ctx, EVP_PKEY_RSA, EVP_PKEY_OP_TYPE_CRYPT,
return int_get_rsa_md_name(ctx, EVP_PKEY_RSA, EVP_PKEY_OP_TYPE_CRYPT,
return EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_RSA, EVP_PKEY_OP_TYPE_CRYPT,
ret = EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_RSA, EVP_PKEY_OP_KEYGEN,
&& ctx->pmeth->pkey_id != EVP_PKEY_RSA
EVP_PKEY_RSA,
case EVP_PKEY_RSA:
pkey = d2i_PublicKey(EVP_PKEY_RSA, NULL, &ppub_key, sizeof(rsa_pub_key));
pkey = d2i_PrivateKey_ex(EVP_PKEY_RSA, NULL, &ppriv_key,
pkey = d2i_PublicKey(EVP_PKEY_RSA, NULL, &ppub_key, sizeof(rsa_pub_key));
pkey = d2i_PrivateKey_ex(EVP_PKEY_RSA, NULL, &ppriv_key,
if ((dasync_rsa_orig = EVP_PKEY_meth_find(EVP_PKEY_RSA)) == NULL
|| (dasync_rsa = EVP_PKEY_meth_new(EVP_PKEY_RSA,
static const int rnid = EVP_PKEY_RSA;
if (nid == EVP_PKEY_RSA) {
#define EVP_PKEY_assign_RSA(pkey, rsa) EVP_PKEY_assign((pkey), EVP_PKEY_RSA, \
#define rsa_evp_type EVP_PKEY_RSA
valid = (ctx->desc->evp_type == EVP_PKEY_RSA);
|| (!isdss && ctx->desc->type != EVP_PKEY_RSA))
return expected_type == EVP_PKEY_RSA;
#define rsa_evp_type EVP_PKEY_RSA
{ EVP_PKEY_RSA, SSL_aRSA }, /* SSL_PKEY_RSA */
NID_sha256, SSL_MD_SHA256_IDX, EVP_PKEY_RSA, SSL_PKEY_RSA,
NID_sha384, SSL_MD_SHA384_IDX, EVP_PKEY_RSA, SSL_PKEY_RSA,
NID_sha512, SSL_MD_SHA512_IDX, EVP_PKEY_RSA, SSL_PKEY_RSA,
NID_sha224, SSL_MD_SHA224_IDX, EVP_PKEY_RSA, SSL_PKEY_RSA,
NID_sha1, SSL_MD_SHA1_IDX, EVP_PKEY_RSA, SSL_PKEY_RSA,
EVP_PKEY_RSA, SSL_PKEY_RSA,
if (pkeyid == EVP_PKEY_RSA)
&& (lu->sig != EVP_PKEY_RSA_PSS || pkeyid != EVP_PKEY_RSA))) {
if (rv == 0 && (!SSL_CONNECTION_IS_TLS13(s) || (lu->sig != EVP_PKEY_RSA && lu->hash != NID_sha1 && lu->hash != NID_sha224)))
if (SSL_CONNECTION_IS_TLS13(s) && sigptr->sig == EVP_PKEY_RSA)
*psig = EVP_PKEY_RSA;
if (pknid == EVP_PKEY_RSA && mdnid == sigalg->hash)
rsign = EVP_PKEY_RSA;
|| lu->sig == EVP_PKEY_RSA
{ "RSA", { "RSA", "type-specific" }, EVP_PKEY_RSA,
{ "RSA", EVP_PKEY_RSA, NULL, NULL },
static const int rnid = EVP_PKEY_RSA;
if (nid == EVP_PKEY_RSA) {
if (!TEST_ptr(test_rsa = EVP_PKEY_meth_new(EVP_PKEY_RSA, 0)))
if (!TEST_ptr(ctx = EVP_PKEY_CTX_new_id(EVP_PKEY_RSA, NULL)))
|| !TEST_true(EVP_PKEY_set_type(tkey, EVP_PKEY_RSA))
id = EVP_PKEY_RSA;
{ kExampleRSAKeyDER, sizeof(kExampleRSAKeyDER), "RSA", EVP_PKEY_RSA },
{ kExampleRSAKeyPKCS8, sizeof(kExampleRSAKeyPKCS8), "RSA", EVP_PKEY_RSA },
{ kExampleRSAKeyPKCS8_v2, sizeof(kExampleRSAKeyPKCS8_v2), "RSA", EVP_PKEY_RSA },
{ kExampleRSAKeyDER, sizeof(kExampleRSAKeyDER), "RSA", EVP_PKEY_RSA, 1, 1, 1,
{ kExampleBadRSAKeyDER, sizeof(kExampleBadRSAKeyDER), "RSA", EVP_PKEY_RSA,
{ kExampleBad2RSAKeyDER, sizeof(kExampleBad2RSAKeyDER), "RSA", EVP_PKEY_RSA,
{ kExampleRSAKeyDER, sizeof(kExampleRSAKeyDER), EVP_PKEY_RSA },
{ kExampleRSAKeyPKCS8, sizeof(kExampleRSAKeyPKCS8), EVP_PKEY_RSA },
if (ak->evptype == EVP_PKEY_RSA) {
if (!TEST_ptr(d2i_PublicKey(EVP_PKEY_RSA, pub, &pp, len)))
#define rsa_evp_type EVP_PKEY_RSA
if (!TEST_ptr(pkey = d2i_PrivateKey_ex(EVP_PKEY_RSA, NULL, &p,
&& test_cert_table(EVP_PKEY_RSA, SSL_aRSA, SSL_PKEY_RSA)
case EVP_PKEY_RSA:
static const int validlist1[] = { NID_sha256, EVP_PKEY_RSA };
static const int validlist2[] = { NID_sha256, EVP_PKEY_RSA, NID_sha512, EVP_PKEY_EC };
static const int invalidlist1[] = { NID_undef, EVP_PKEY_RSA };
static const int invalidlist3[] = { NID_sha256, EVP_PKEY_RSA, NID_sha256 };