---
name: "libressl-i2d_PKCS7_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_PKCS7_bio_stream"
---

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

output PKCS7 structure in BER format

## NAME

**i2d\_PKCS7\_bio\_stream** – output PKCS7 structure in BER format

## SYNOPSIS

Crypto Library (libcrypto, -lcrypto)

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

*int*\

**i2d\_PKCS7\_bio\_stream**(*BIO \*out*, *PKCS7 \*p7*, *BIO \*data*, *int flags*);

## DESCRIPTION

**i2d\_PKCS7\_bio\_stream**() outputs a *PKCS7* structure in BER format. It is otherwise identical to the function SMIME\_write\_PKCS7(3). This function is effectively a version of i2d\_PKCS7\_bio(3) supporting streaming.

## RETURN VALUES

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

## SEE ALSO

BIO\_new(3), ERR\_get\_error(3), PEM\_write\_bio\_PKCS7\_stream(3), PEM\_write\_PKCS7(3), PKCS7\_final(3), PKCS7\_new(3), SMIME\_write\_PKCS7(3)

## HISTORY

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

## BUGS

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