---
name: "libressl-i2d_CMS_bio_stream"
section: "3"
platform: "linux"
package: "libressl"
version: "4.4.0-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/libressl-i2d_CMS_bio_stream"
---

# libressl-i2d\_CMS\_bio\_stream(3)

output CMS\_ContentInfo structure in BER format

## NAME

**i2d\_CMS\_bio\_stream** – output CMS\_ContentInfo structure in BER format

## SYNOPSIS

Crypto Library (libcrypto, -lcrypto)

**#include \<openssl/cms.h\>**

*int*\

**i2d\_CMS\_bio\_stream**(*BIO \*out*, *CMS\_ContentInfo \*cms*, *BIO \*data*, *int flags*);

## DESCRIPTION

**i2d\_CMS\_bio\_stream**() outputs a *CMS\_ContentInfo* structure in BER format.

It is otherwise identical to the function SMIME\_write\_CMS(3).

This function is effectively a version of i2d\_CMS\_bio(3) supporting streaming.

## RETURN VALUES

**i2d\_CMS\_bio\_stream**() returns 1 for success or 0 for failure.

## SEE ALSO

CMS\_ContentInfo\_new(3), CMS\_encrypt(3), CMS\_sign(3), ERR\_get\_error(3), PEM\_write\_bio\_CMS\_stream(3), SMIME\_write\_CMS(3)

## HISTORY

**i2d\_CMS\_bio\_stream**() first appeared in OpenSSL 1.0.0 and has been available since OpenBSD 6.7.

## BUGS

The prefix "i2d" is arguably wrong because the function outputs BER format.
