EVP_PKEY_asn1_set_public

Install public-key decode, encode, compare, print, size, and bits callbacks on an ASN.1 method.

Synopsis

Declared in <openssl/evp.h>

void
EVP_PKEY_asn1_set_public(
    EVP_PKEY_ASN1_METHOD* ameth,
    int(* pub_decode)(EVP_PKEY*, X509_PUBKEY const*),
    int(* pub_encode)(X509_PUBKEY*, EVP_PKEY const*),
    int(* pub_cmp)(EVP_PKEY const*, EVP_PKEY const*),
    int(* pub_print)(BIO*, EVP_PKEY const*, int, ASN1_PCTX*),
    int(* pkey_size)(EVP_PKEY const*),
    int(* pkey_bits)(EVP_PKEY const*));

Parameters

NameDescription
amethASN.1 method being customized.
pub_decodeDecode an X509_PUBKEY into pk.
pub_encodeEncode pk into an X509_PUBKEY.
pub_cmpCompare two public keys (1 match, 0 differ, negative on error).
pub_printPrint the public key to a BIO.
pkey_sizeReturn the maximum output size in bytes for operations with pk.
pkey_bitsReturn the key size in bits for pk.