Write a PEM object (header, optional headers, and base64 body) to a BIO.

Synopsis

Declared in <openssl/pem.h>

int
PEM_write_bio(
    BIO* bp,
    char const* name,
    char const* hdr,
    unsigned char const* data,
    long len);

Return Value

1 on success, or 0 on error.

Parameters

Name

Description

bp

BIO that receives the PEM text.

name

PEM type label such as "CERTIFICATE".

hdr

Optional additional header lines, or NULL / empty string.

data

Binary payload to base64‐encode.

len

Length of data in bytes.

Created with MrDocs