PEM_read_PKCS8

Read a PKCS#8 encrypted private-key envelope (X509_SIG) from a PEM-encoded FILE.

Synopsis

Declared in <openssl/pem.h>

X509_SIG*
PEM_read_PKCS8(
    FILE* fp,
    X509_SIG** x,
    pem_password_cb* cb,
    void* u);

Return Value

Encrypted PKCS#8 structure on success, or NULL on failure.

Parameters

NameDescription
fpFILE to read from.
xOptional address of an X509_SIG pointer to reuse, or NULL.
cbPassword callback for encrypted PEM, or NULL.
uApplication data passed to cb.