Set the peer public key for derivation, optionally validating it first.
Declared in <openssl/evp.h>
int
EVP_PKEY_derive_set_peer_ex(
EVP_PKEY_CTX* ctx,
EVP_PKEY* peer,
int validate_peer);
1 on success, or a non-positive value on failure.
| Name | Description |
|---|---|
| ctx | Derivation context previously initialized with EVP_PKEY_derive_init() or _ex(). |
| peer | Peer's public key used to compute the shared secret. |
| validate_peer | Non-zero to run a public-key check on peer before use, or 0 to skip. |