[#EVP_PKEY_CTX_set1_rsa_keygen_pubexp]
= EVP&lowbar;PKEY&lowbar;CTX&lowbar;set1&lowbar;rsa&lowbar;keygen&lowbar;pubexp
:mrdocs:

Set the RSA public exponent for key generation, copying `pubexp&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;set1&lowbar;rsa&lowbar;keygen&lowbar;pubexp(
    xref:EVP_PKEY_CTX.adoc[EVP&lowbar;PKEY&lowbar;CTX]* ctx,
    xref:BIGNUM.adoc[BIGNUM]* pubexp);
----

== 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 algorithm&period;
| *pubexp*
| Public exponent to copy (typically an odd integer such as 65537)&semi; caller retains ownership&period;
|===


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