[#DH_set0_key] = DH_set0_key :mrdocs: Set the public and/or private key BIGNUMs on a DH object, transferring ownership (deprecated). == Synopsis Declared in `<openssl/dh.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- [[deprecated]] int DH_set0_key( xref:DH.adoc[DH]* dh, xref:BIGNUM.adoc[BIGNUM]* pub_key, xref:BIGNUM.adoc[BIGNUM]* priv_key); ---- [WARNING] ==== https://en.cppreference.com/cpp/language/attributes/deprecated[Deprecated^]. Use of this entity is allowed but discouraged. ==== == Description Non‐NULL values are owned by `dh` after a successful call and must not be freed by the caller. == Return Value 1 on success, or 0 on failure. == Parameters [cols="1,4"] |=== | Name| Description | *dh* | DH object to update. | *pub_key* | New public value, or NULL to leave the existing public key unchanged. | *priv_key* | New private value, or NULL to leave the existing private key unchanged. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#