PEM_write_PUBKEY_ex

Write a SubjectPublicKeyInfo public key to a FILE with a library context.

Synopsis

Declared in <openssl/pem.h>

int
PEM_write_PUBKEY_ex(
    FILE* fp,
    EVP_PKEY const* x,
    OSSL_LIB_CTX* libctx,
    char const* propq);

Return Value

1 on success, or 0 on failure.

Parameters

NameDescription
fpFILE to write to.
xPublic key to encode.
libctxLibrary context used for provider-backed encoding, or NULL for the default.
propqProperty query for algorithm fetches, or NULL.