PEM_WRITE_BIO_CMS_STREAM(3SSL)

✨ PEM_WRITE_BIO_CMS_STREAM ✨

okay bestie, welcome to the OpenSSL manual, section 3SSL πŸŽ€ this one's a lil function that lives in the OpenSSL crew and it's here to help you yeet a CMS_ContentInfo structure out into the world in PEM format. literally so iconic of it.


🌸 NAME 🌸

PEM_write_bio_CMS_stream β€” output CMS_ContentInfo structure in PEM format πŸ’–

that's the whole job. it takes your CMS thingy and streams it out as PEM. no cap.


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <openssl/cms.h>

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

yep, that's the whole vibe. four args, one int back. she's simple like that πŸ’…


πŸ‘‘ DESCRIPTION πŸ‘‘

PEM_write_bio_CMS_stream() outputs a CMS_ContentInfo structure in PEM format ✨

and other than that? bestie, it's otherwise identical to the function SMIME_write_CMS(). same energy, same behaviour, just this name. periodt.


🧚 NOTES 🧚

this function is effectively a version of PEM_write_bio_CMS() that supports streaming 🌊 so if you were sitting there like "hmm I wish PEM_write_bio_CMS() could stream," boom, here she is. iykyk.


πŸ“ RETURN VALUES πŸ“

  • 1 β€” slay πŸ’– success, we ate
  • 0 β€” not slay 😭 failure, go check ERR_get_error(3) probably

🌈 SEE ALSO 🌈

go read these too, they're all part of the fam 🫢


πŸ’œ HISTORY πŸ’œ

the PEM_write_bio_CMS_stream() function was added in OpenSSL 1.0.0 ⭐ so she's been around a minute. a real main character from day one.


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


bestie this is version 4.0.3, dated 2026-09-29, straight from the OpenSSL manual page PEM_WRITE_BIO_CMS_STREAM(3SSL) β€” go stream something pretty πŸ’…βœ¨
πŸ“¦ where this page comes from