- if (strcmp(name, "digest") == 0) {
- int ret;
- EVP_MD *md;
-
- if (!EVP_PKEY_CTX_IS_SIGNATURE_OP(ctx) || ctx->op.sig.signature == NULL)
- return 0;
- md = EVP_MD_fetch(ossl_provider_library_context(ctx->op.sig.signature->prov),
- value, NULL);
- if (md == NULL)
- return 0;
- ret = EVP_PKEY_CTX_set_signature_md(ctx, md);
- EVP_MD_free(md);
- return ret;
- }
-
- if (strcmp(name, "rsa_padding_mode") == 0) {
- int pm;
-
- if (strcmp(value, "pkcs1") == 0) {
- pm = RSA_PKCS1_PADDING;
- } else if (strcmp(value, "sslv23") == 0) {
- pm = RSA_SSLV23_PADDING;
- } else if (strcmp(value, "none") == 0) {
- pm = RSA_NO_PADDING;
- } else if (strcmp(value, "oeap") == 0) {
- pm = RSA_PKCS1_OAEP_PADDING;
- } else if (strcmp(value, "oaep") == 0) {
- pm = RSA_PKCS1_OAEP_PADDING;
- } else if (strcmp(value, "x931") == 0) {
- pm = RSA_X931_PADDING;
- } else if (strcmp(value, "pss") == 0) {
- pm = RSA_PKCS1_PSS_PADDING;
- } else {
- ERR_raise(ERR_LIB_RSA, RSA_R_UNKNOWN_PADDING_TYPE);
- return -2;
- }
- return EVP_PKEY_CTX_set_rsa_padding(ctx, pm);
- }