libressl-CMS_uncompress3
Uncompress a cms compresseddata structure
Usage
Crypto Library (libcrypto, -lcrypto)
#include <openssl/cms.h>
int
CMS_uncompress(CMS_ContentInfo *cms, BIO *dcont, BIO *out, unsigned int flags);
Overview
CMS_uncompress() extracts and uncompresses the content of a CMS CompressedData structure cms and writes it to out.
In the rare case where the compressed content is detached, pass it in via dcont. For normal use, set dcont to NULL.
The only currently supported compression algorithm is zlib: if the structure indicates the use of any other algorithm, an error is returned. If zlib support is not compiled in, CMS_uncompress() always returns an error.
If the CMS_TEXT bit is set in flags, MIME headers for type text/plain are deleted from the content. If the content is not of type text/plain, an error is returned.
Return values
CMS_uncompress() returns 1 for success or 0 for failure. The error can be obtained from ERR_get_error(3).