PEM_WRITE_BIO_CMS_STREAM(3ossl)

πŸ“¦ version 3.5.0, in opensuse-leap 16.0

πŸ’… PEM_WRITE_BIO_CMS_STREAM(3ossl) β€” the OpenSSL glow-up

okay so bestie, this is the manual page for PEM_WRITE_BIO_CMS_STREAM(3ossl) from OpenSSL, and honestly? it's a short one, but she serves. let's get into it πŸŽ€


✨ NAME ✨

PEM_write_bio_CMS_stream β€” output a CMS_ContentInfo structure in PEM format. that's it, that's the whole job, and she does it flawlessly πŸ’…


🌸 SYNOPSIS 🌸

#include <openssl/cms.h>

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

look at that signature. four args, zero drama. iconic πŸ’–


πŸ¦‹ DESCRIPTION πŸ¦‹

so PEM_write_bio_CMS_stream() outputs a CMS_ContentInfo structure in PEM format. yes, PEM β€” the cute lil -----BEGIN text-y one, not the raw binary one.

and like, everything else about it? it is otherwise identical to the function SMIME_write_CMS(). literally identical in every other way, no cap. so if you already know that one, you already know this one 🫢


⭐ NOTES ⭐

this function is effectively a version of PEM_write_bio_CMS() that supports streaming. that's the whole tea β€” same energy, but she can stream πŸ”₯


πŸ‘‘ RETURN VALUES πŸ‘‘

PEM_write_bio_CMS_stream() returns 1 for success or 0 for failure.

so like… check your return values, bestie. 0 means something went wrong and you should go ask ERR_get_error(3) what happened 😭


🌈 SEE ALSO 🌈

(the CMS_encrypt(3) and CMS_decrypt(3) entries are listed on one line in the original β€” that's not a typo, that's just how the manpage flexes ✨)


🧚 HISTORY 🧚

the PEM_write_bio_CMS_stream() function was added in OpenSSL 1.0.0. she's been around. she's a legacy queen πŸŽ€


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>.

fr fr read the license before you go copy-pasting, that's the one thing you gotta actually do πŸ™ˆ

and that's the page!! mwah πŸ’‹ this was OpenSSL 3.5.0, dated 2026-09-25, and the page itself is PEM_WRITE_BIO_CMS_STREAM(3ossl) β€” take care of her, she's a streamer πŸ¦‹βœ¨

πŸ“¦ where this page comes from