OpenBSD manual page server

Manual Page Search Parameters

I2D_ASN1_BIO_STREAM(3) Library Functions Manual I2D_ASN1_BIO_STREAM(3)

i2d_ASN1_bio_streamgeneric BER streamer

#include <openssl/asn1.h>

i2d_ASN1_bio_stream(BIO *out_bio, ASN1_VALUE *val_in, BIO *in_bio, int flags, const ASN1_ITEM *it);

If the bit SMIME_STREAM is not set in the flags argument, () does the same as ASN1_item_i2d_bio(3), ignoring the in_bio and flags arguments.

If the bit SMIME_STREAM is set, it creates a streaming BIO with BIO_new_NDEF(3), copies the data from in_bio to it using SMIME_crlf_copy(3), finalizes the output with BIO_flush(3), and frees the newly created BIOs up to but not including out_bio.

If it is PKCS7_it, this function behaves exactly as i2d_PKCS7_bio_stream(3); for CMS_ContentInfo_it, it behaves exactly as i2d_CMS_bio_stream(3). For other values of it, the function fails.

i2d_ASN1_bio_stream() is intended to return 1 on success or 0 on failure.

ASN1_item_i2d_bio(3), ASN1_item_ndef_i2d(3), BIO_flush(3), BIO_new(3), BIO_new_NDEF(3), BIO_push(3), i2d_CMS_bio_stream(3), i2d_PKCS7_bio_stream(3), PEM_write_bio_ASN1_stream(3), SMIME_crlf_copy(3), SMIME_write_ASN1(3)

i2d_ASN1_bio_stream() first appeared in OpenSSL 1.0.0 and has been available since OpenBSD 4.9.

Many kinds of errors are silently ignored. This function may return 1 even if it only produced partial output or no output at all.

December 13, 2021 OpenBSD-7.3