Derive the DH shared secret from a peer public key (deprecated).

Synopsis

Declared in <openssl/dh.h>

[[deprecated]]
int
DH_compute_key(
    unsigned char* key,
    BIGNUM const* pub_key,
    DH* dh);
Warning

Deprecated. Use of this entity is allowed but discouraged.

Return Value

Number of bytes written, or ‐1 on error.

Parameters

Name

Description

key

Output buffer of at least DH_size(dh) bytes.

pub_key

Peer public value.

dh

DH object holding the private key and domain parameters.

Created with MrDocs