[#EVP_PKEY_CTX_set_rsa_keygen_primes]
= EVP&lowbar;PKEY&lowbar;CTX&lowbar;set&lowbar;rsa&lowbar;keygen&lowbar;primes
:mrdocs:

Set how many primes to use when generating a multi&hyphen;prime RSA key&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;keygen&lowbar;primes(
    xref:EVP_PKEY_CTX.adoc[EVP&lowbar;PKEY&lowbar;CTX]* ctx,
    int primes);
----

== Return Value

1 on success, or a non&hyphen;positive value on failure&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *ctx*
| Keygen context for an RSA key type&period;
| *primes*
| Number of primes (2 for classic RSA&semi; larger for multi&hyphen;prime)&period;
|===


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