EVP_PKEY_is_a

Test whether a public-key object is known under the given algorithm name.

Synopsis

Declared in <openssl/evp.h>

int
EVP_PKEY_is_a(
    EVP_PKEY const* pkey,
    char const* name);

Return Value

1 if pkey matches name, or 0 otherwise (including when pkey is NULL).

Parameters

NameDescription
pkeyKey to query.
nameAlgorithm name or synonym (for example "RSA" or "EC").