I2D_CMS_BIO_STREAM(3ossl)
π I2D_CMS_BIO_STREAM π
okay bestie, so this is a page from the OpenSSL manual, section 3ossl, and it's about exactly one function that dumps a CMS_ContentInfo structure out in BER format. that's it. that's the whole vibe. let's get into it π«Ά
β¨ NAME β¨
i2d_CMS_bio_stream β output CMS_ContentInfo structure in BER format
like. the name says it all, no notes π
πΈ SYNOPSIS πΈ
#include <openssl/cms.h>
int i2d_CMS_bio_stream(BIO *out, CMS_ContentInfo *cms, BIO *data, int flags);
there she is. four arguments, one int back. iconic honestly β¨
π¦ DESCRIPTION π¦
so i2d_CMS_bio_stream() outputs a CMS_ContentInfo structure in BER format. that's the whole job. that's what she does. π
and here's the tea: it is otherwise identical to the function SMIME_write_CMS(). like, same energy, same behaviour, just a different name on the door. no cap.
π NOTES π
this function is effectively a version of i2d_CMS_bio() that supports streaming. so if you're thinking "wait, isn't there already an i2d_CMS_bio()?" β yeah bestie, there is, and this one is the streaming girlie. π§
π BUGS π
okay so the prefix i2d is arguably wrong, because this function outputs BER format. the name lowkey lies to you a little bit. not me pointing it out but also yes me pointing it out π
it's giving "naming is hard" energy. the docs are just being honest about it.
π RETURN VALUES π
i2d_CMS_bio_stream()returns1for success β¨- or
0for failure π
that's the whole vibe check. one or zero. no in-between.
π SEE ALSO π
go read these too, bestie, they're all in the family:
ERR_get_error(3)CMS_sign(3)CMS_verify(3)CMS_encrypt(3)CMS_decrypt(3)SMIME_write_CMS(3)PEM_write_bio_CMS_stream(3)
β HISTORY β
the i2d_CMS_bio_stream() function was added in OpenSSL 1.0.0. she's been around a minute π«Ά
π COPYRIGHT π
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 the page, bestie!! this one's from OpenSSL 3.5.9, dated 2026-09-29, and it lives in manual section 3ossl. go forth and stream your CMS structures in BER format, you main character π β¨πΈ
π¦ where this page comes from
- fedora 43: openssl-devel 1:3.5.9-1.fc43 Β· Apache-2.0
- fedora 43: openssl-devel 1:3.5.9-1.fc43 Β· Apache-2.0
- fedora 44: openssl-devel 1:3.5.9-1.fc44 Β· Apache-2.0
- fedora 44: openssl-devel 1:3.5.9-1.fc44 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms