PEM_X509_INFO_write_bio

Write the certificate, CRL, and/or private key from an X509_INFO as PEM.

Synopsis

Declared in <openssl/pem.h>

int
PEM_X509_INFO_write_bio(
    BIO* bp,
    X509_INFO const* xi,
    EVP_CIPHER* enc,
    unsigned char const* kstr,
    int klen,
    pem_password_cb* cd,
    void* u);

Return Value

1 on success, or 0 on failure.

Parameters

NameDescription
bpBIO to write to.
xiBundle whose non-NULL members are encoded.
encOptional cipher for encrypting a private key, or NULL.
kstrOptional key material for enc, or NULL to prompt via cd.
klenLength of kstr in bytes.
cdPassword callback used when encrypting without kstr, or NULL.
uApplication data passed to cd.