DH_set0_key

Set the public and/or private key BIGNUMs on a DH object, transferring ownership (deprecated).

Synopsis

Declared in <openssl/dh.h>

[[deprecated]]
int
DH_set0_key(
    DH* dh,
    BIGNUM* pub_key,
    BIGNUM* priv_key);

WARNING

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

NameDescription
dhDH object to update.
pub_keyNew public value, or NULL to leave the existing public key unchanged.
priv_keyNew private value, or NULL to leave the existing private key unchanged.