Add control to retrieve signature MD.
[openssl.git] / crypto / rsa / rsa_pmeth.c
index b654b00ea865586ec3db98f69ea4551888f7dea7..86a7c8dd3f102da5b7b9f51bdae5b31890f38d28 100644 (file)
@@ -552,6 +552,10 @@ static int pkey_rsa_ctrl(EVP_PKEY_CTX *ctx, int type, int p1, void *p2)
                rctx->md = p2;
                return 1;
 
+               case EVP_PKEY_CTRL_GET_MD:
+               *(const EVP_MD **)p2 = rctx->md;
+               return 1;
+
                case EVP_PKEY_CTRL_RSA_MGF1_MD:
                case EVP_PKEY_CTRL_GET_RSA_MGF1_MD:
                if (rctx->pad_mode != RSA_PKCS1_PSS_PADDING)
@@ -621,6 +625,8 @@ static int pkey_rsa_ctrl_str(EVP_PKEY_CTX *ctx,
                        pm = RSA_NO_PADDING;
                else if (!strcmp(value, "oeap"))
                        pm = RSA_PKCS1_OAEP_PADDING;
+               else if (!strcmp(value, "oaep"))
+                       pm = RSA_PKCS1_OAEP_PADDING;
                else if (!strcmp(value, "x931"))
                        pm = RSA_X931_PADDING;
                else if (!strcmp(value, "pss"))