OSSL_DECODER_CTX_new_for_pkey

Create a decoder context preconfigured to decode an EVP_PKEY.

Synopsis

Declared in <openssl/decoder.h>

OSSL_DECODER_CTX*
OSSL_DECODER_CTX_new_for_pkey(
    EVP_PKEY** pkey,
    char const* input_type,
    char const* input_struct,
    char const* keytype,
    int selection,
    OSSL_LIB_CTX* libctx,
    char const* propquery);

Return Value

New decoder context, or NULL on error; free with OSSL_DECODER_CTX_free().

Parameters

NameDescription
pkeyAddress of a pointer set to the decoded key on success.
input_typeExpected encoding type (for example "DER"), or NULL.
input_structExpected ASN.1 structure name, or NULL.
keytypeTarget key type name (for example "RSA"), or NULL.
selectionOSSL_KEYMGMT_SELECT_* mask for components to decode.
libctxLibrary context, or NULL for the default.
propqueryOptional property query for decoder fetching, or NULL.