EVP_PKEY_derive_set_peer_ex

Set the peer public key for derivation, optionally validating it first.

Synopsis

Declared in <openssl/evp.h>

int
EVP_PKEY_derive_set_peer_ex(
    EVP_PKEY_CTX* ctx,
    EVP_PKEY* peer,
    int validate_peer);

Return Value

1 on success, or a non-positive value on failure.

Parameters

NameDescription
ctxDerivation context previously initialized with EVP_PKEY_derive_init() or _ex().
peerPeer's public key used to compute the shared secret.
validate_peerNon-zero to run a public-key check on peer before use, or 0 to skip.