I2D_CMS_BIO_STREAM(3SSL)
π i2d_CMS_bio_stream β the OpenSSL manual, but make it make sense π
okay bestie, we're reading I2D_CMS_BIO_STREAM(3SSL) from the OpenSSL manual today, and honestly? It's short, it's sweet, it's giving "one job and it does it." Let's go π«Ά
β¨ NAME β¨
i2d_CMS_bio_stream β output a CMS_ContentInfo structure in BER format π
π SYNOPSIS π
#include <openssl/cms.h>
int i2d_CMS_bio_stream(BIO *out, CMS_ContentInfo *cms, BIO *data, int flags);
look at that signature. four args. clean. no notes. π
πΈ DESCRIPTION πΈ
So what does i2d_CMS_bio_stream() actually do? It outputs a CMS_ContentInfo structure in BER format. That's the whole thing. That's the job. β¨
Other than that? It's otherwise identical to the function SMIME_write_CMS(). Literally same energy, different name. iykyk π
π NOTES π
Sis is effectively a version of i2d_CMS_bio() that supports streaming. That's it, that's the note. Main character behavior honestly β same function, but it can handle data flowing through instead of needing the whole thing at once. π¦
π BUGS π
Okay so, the prefix "i2d" is arguably wrong, because this function outputs BER format. Not DER. The name said one thing and the function did another, and nobody fixed it. not me pointing out the naming crimes of 2010 π«
bestie this is a documented naming oopsie, not something you need to fix. just. be aware. π
β RETURN VALUES β
1β success, we ate, slay π0β failure π
That's the whole scale. No in-between. Binary queen. π
π₯ SEE ALSO π₯
Go read these too, they're part of the lore:
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. Vintage. Elder. Iconic. π
π 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!! this was OpenSSL 4.0.3, dated 2026-09-29, kith kith, go stream your BER and hydrate bestie π«Άβ¨
π¦ where this page comes from
- ubuntu stonking: libssl-doc 4.0.3-1ubuntu1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms