PEM_write_bio_ASN1_stream

Stream-encode an ASN.1 value as a PEM object, optionally pulling content from in.

Synopsis

Declared in <openssl/asn1.h>

int
PEM_write_bio_ASN1_stream(
    BIO* out,
    ASN1_VALUE* val,
    BIO* in,
    int flags,
    char const* hdr,
    ASN1_ITEM const* it);

Return Value

1 on success, or 0 on failure.

Parameters

NameDescription
outBIO that receives the PEM output.
valASN.1 value to encode (not const because streaming may update state).
inOptional content BIO for indefinite-length / streaming payloads, or NULL.
flagsSMIME/CMS streaming flags (for example SMIME_STREAM).
hdrPEM header label such as "CMS" or "PKCS7" (without BEGIN/END).
itASN.1 item descriptor for val.