CMS_UNCOMPRESS(3SSL)
π CMS_UNCOMPRESS π
okay bestie, this page is all about CMS_uncompress, a lil function from the OpenSSL manual, section 3SSL β¨ it takes a CMS CompressedData thing and un-squishes it. that's the whole vibe. let's go π«Ά
π NAME π
CMS_uncompress β uncompress a CMS CompressedData structure π
πΈ SYNOPSIS πΈ
#include <openssl/cms.h>
int CMS_uncompress(CMS_ContentInfo *cms, BIO *dcont, BIO *out, unsigned int flags);
β¨ DESCRIPTION β¨
so CMS_uncompress() grabs the content out of a CMS CompressedData structure β that's your cms β and uncompresses it. no cap. π¦
out is a BIO, and that's where the content gets written. and flags is an optional little set of flags, no big deal. π
now, about dcont: that parameter is for the rare case where the compressed content is detached. like, rare rare. normally you just set it to NULL and move on with your life. π
π NOTES π
The only compression algorithm supported rn is zlib. if the structure is giving any other algorithm, you get an error. periodt. π
and if zlib support wasn't compiled into OpenSSL? then CMS_uncompress() will always return an error. literally always. π
the following flags can be passed in the flags parameter:
CMS_TEXTβ if this is set, the MIME headers for typetext/plainare deleted from the content. but bestie, if the content isn't of typetext/plain, you get an error instead. so know your content ok πΈ
π«Ά RETURN VALUES π«Ά
CMS_uncompress() returns either 1 for success or 0 for failure. and you can grab the error with ERR_get_error(3). slay π
π BUGS π
the lack of single pass processing, plus the need to hold all the data in memory β the stuff mentioned over in CMS_verify() β also applies to CMS_decompress(). so yeah. that's still a thing. π
π SEE ALSO π
π 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>.
okay that's the whole page, you ate that π version 4.0.3, dated 2026-09-29 β mwah, iconic, bye 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