[#PEM_write_bio] = PEM_write_bio :mrdocs: Write a PEM object (header, optional headers, and base64 body) to a BIO. == Synopsis Declared in `<openssl/pem.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- int PEM_write_bio( xref:BIO.adoc[BIO]* bp, char const* name, char const* hdr, unsigned char const* data, long len); ---- == Return Value 1 on success, or 0 on error. == Parameters [cols="1,4"] |=== | 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. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#