CMS_compress(3) | LibreSSL | CMS_compress(3) |
NAME
CMS_compress - create a CMS CompressedData structureSYNOPSIS
#include <openssl/cms.h>
CMS_ContentInfo *CMS_compress(BIO *in, int comp_nid, unsigned int flags);
DESCRIPTION
CMS_compress() creates and returns a CMS CompressedData structure. comp_nid is the compression algorithm to use or NID_undef to use the default algorithm (zlib compression). in is the content to be compressed. flags is an optional set of flags.NOTES
The only currently supported compression algorithm is zlib using the NID NID_zlib_compression.NOTES
If the flag CMS_STREAM is set the returned CMS_ContentInfo structure is not complete and outputting its contents via a function that does not properly finalize the CMS_ContentInfo structure will give unpredictable results.RETURN VALUES
CMS_compress() returns either a CMS_ContentInfo structure or NULL if an error occurred. The error can be obtained from ERR_get_error(3).SEE ALSO
ERR_get_error(3), CMS_uncompress(3)HISTORY
CMS_compress() was added to OpenSSL 0.9.8 The CMS_STREAM flag was first supported in OpenSSL 1.0.0.2015-10-26 | LibreSSL |