[#DH_set0_key]
= DH&lowbar;set0&lowbar;key
:mrdocs:

Set the public and&sol;or private key BIGNUMs on a DH object, transferring ownership (deprecated)&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;deprecated&rsqb;&rsqb;
int
DH&lowbar;set0&lowbar;key(
    xref:DH.adoc[DH]* dh,
    xref:BIGNUM.adoc[BIGNUM]* pub&lowbar;key,
    xref:BIGNUM.adoc[BIGNUM]* priv&lowbar;key);
----

[WARNING]
====
https://en.cppreference.com/cpp/language/attributes/deprecated[Deprecated^]. Use of this entity is allowed but discouraged.
====
== Description

Non&hyphen;NULL values are owned by `dh` after a successful call and must not be freed by the caller&period;

== Return Value

1 on success, or 0 on failure&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *dh*
| DH object to update&period;
| *pub&lowbar;key*
| New public value, or NULL to leave the existing public key unchanged&period;
| *priv&lowbar;key*
| New private value, or NULL to leave the existing private key unchanged&period;
|===


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