[#EVP_PKEY_CTX_set_ec_paramgen_curve_nid]
= EVP&lowbar;PKEY&lowbar;CTX&lowbar;set&lowbar;ec&lowbar;paramgen&lowbar;curve&lowbar;nid
:mrdocs:

Set the named curve NID used when generating EC parameters or keys&period;

== Synopsis

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

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

== Return Value

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

== Parameters

[cols="1,4"]
|===
| Name| Description
| *ctx*
| EVP&lowbar;PKEY context for EC parameter or key generation&period;
| *nid*
| Curve NID such as NID&lowbar;X9&lowbar;62&lowbar;prime256v1&period;
|===


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