[#EVP_PKEY_CTX_set_rsa_mgf1_md_name]
= EVP&lowbar;PKEY&lowbar;CTX&lowbar;set&lowbar;rsa&lowbar;mgf1&lowbar;md&lowbar;name
:mrdocs:

Set the MGF1 digest for RSA&hyphen;PSS or RSA&hyphen;OAEP by algorithm name&period;

== Synopsis

Declared in `&lt;openssl&sol;rsa&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
EVP&lowbar;PKEY&lowbar;CTX&lowbar;set&lowbar;rsa&lowbar;mgf1&lowbar;md&lowbar;name(
    xref:EVP_PKEY_CTX.adoc[EVP&lowbar;PKEY&lowbar;CTX]* ctx,
    char const* mdname,
    char const* mdprops);
----

== Return Value

1 on success, or a negative value on failure&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *ctx*
| Key operation context configured for RSA padding that uses MGF1&period;
| *mdname*
| Digest name (for example &quot;SHA256&quot;)&period;
| *mdprops*
| Optional property query for fetching `mdname,` or NULL&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
