I2D_CMS_BIO_STREAM(3ossl)

πŸ“¦
version 15.1 Β· 3 versions
, in freebsd 15.1

✨ i2d_CMS_bio_stream πŸ’…

okay bestie, welcome to the 3ossl girlies' corner of the manual galaxy πŸŽ€ this one's a little function with a big job and honestly a slightly misleading name, but we'll get there. sit down, hydrate, let's go 🫢


🌸 NAME 🌸

i2d_CMS_bio_stream β€” writes out a CMS_ContentInfo structure in BER format, straight into a BIO. that's the whole vibe πŸ’–


⭐ SYNOPSIS ⭐

#include <openssl/cms.h>

int i2d_CMS_bio_stream(BIO *out, CMS_ContentInfo *cms, BIO *data, int flags);

like, that's it. that's the signature. iconic, no notes πŸ‘‘


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so i2d_CMS_bio_stream() takes a CMS_ContentInfo structure and outputs it in BER format. periodt.

and here's the tea: it's otherwise identical to the function SMIME_write_CMS(). like, literally the same energy, same behaviour, no cap 🧚


πŸ”₯ NOTES πŸ”₯

this function is effectively a version of i2d_CMS_bio() that supports streaming. so like, same friend group, different main character energy ✨


πŸ’€ BUGS πŸ’€

ngl, the i2d prefix is arguably wrong here, because the function outputs BER format. like bestie, the name is giving false advertising 😭 we said what we said.


🌈 RETURN VALUES 🌈

i2d_CMS_bio_stream() returns 1 for success or 0 for failure. that's it. simple king behaviour πŸ‘‘


πŸ’œ SEE ALSO πŸ’œ

go read those too, they're all in the same cinematic universe 🎬


πŸ“ HISTORY πŸ“

the i2d_CMS_bio_stream() function was added in OpenSSL 1.0.0. a legend from the start πŸ’…


Copyright 2008-2016 The OpenSSL Project Authors. All Rights Reserved.

Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at <https://www.openssl.org/source/license.html>.


and that's a wrap, bestie 🫢 this page is from OpenSSL 3.5.6, dated 2026-04-07, and you found it under the manual name I2D_CMS_BIO_STREAM(3ossl). go stream those BER outputs, you absolute icon πŸŒŸπŸ’–

πŸ“¦ where this page comes from