EVP_PKEY_CTX_ctrl

Send an algorithm-specific control command to a key context.

Synopsis

Declared in <openssl/evp.h>

int
EVP_PKEY_CTX_ctrl(
    EVP_PKEY_CTX* ctx,
    int keytype,
    int optype,
    int cmd,
    int p1,
    void* p2);

Return Value

Positive on success, 0 or negative on failure.

Parameters

NameDescription
ctxKey context receiving the command.
keytypeExpected key type, or -1 to skip the type check.
optypeExpected operation type, or -1 to skip the operation check.
cmdAlgorithm-specific control command.
p1Integer argument for cmd.
p2Pointer argument for cmd, or NULL.