[#EVP_PKEY_CTX_set_dh_paramgen_prime_len]
= EVP&lowbar;PKEY&lowbar;CTX&lowbar;set&lowbar;dh&lowbar;paramgen&lowbar;prime&lowbar;len
:mrdocs:

Set the DH parameter&hyphen;generation prime (p) length in bits&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
EVP&lowbar;PKEY&lowbar;CTX&lowbar;set&lowbar;dh&lowbar;paramgen&lowbar;prime&lowbar;len(
    xref:EVP_PKEY_CTX.adoc[EVP&lowbar;PKEY&lowbar;CTX]* ctx,
    int pbits);
----

== Return Value

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

== Parameters

[cols="1,4"]
|===
| Name| Description
| *ctx*
| EVP&lowbar;PKEY&lowbar;CTX configured for DH parameter generation&period;
| *pbits*
| Desired bit length of the prime modulus p&period;
|===


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