EVP_PKEY_set1_encoded_public_key

Set the public key on pkey from an encoded public-key octet string.

Synopsis

Declared in <openssl/evp.h>

int
EVP_PKEY_set1_encoded_public_key(
    EVP_PKEY* pkey,
    unsigned char const* pub,
    size_t publen);

Return Value

1 on success, or 0 on failure.

Parameters

NameDescription
pkeyKey object that receives the public key (type must already be set).
pubEncoded public-key bytes (format is algorithm-specific, for example a TLS point).
publenLength of pub in bytes.