EVP_PKEY_assign

Assign a low-level key object of type to an EVP_PKEY (deprecated).

Synopsis

Declared in <openssl/evp.h>

[[deprecated]]
int
EVP_PKEY_assign(
    EVP_PKEY* pkey,
    int type,
    void* key);

WARNING

Deprecated. Use of this entity is allowed but discouraged.

Return Value

1 on success, or 0 on failure.

Parameters

NameDescription
pkeyDestination key wrapper; previous key material is freed.
typeKey type NID such as EVP_PKEY_RSA or EVP_PKEY_EC.
keyType-specific key pointer (for example RSA *) that pkey will own.