1238384Sjkim=pod 2238384Sjkim 3238384Sjkim=head1 NAME 4238384Sjkim 5238384Sjkim CMS_uncompress - uncompress a CMS CompressedData structure 6238384Sjkim 7238384Sjkim=head1 SYNOPSIS 8238384Sjkim 9238384Sjkim #include <openssl/cms.h> 10238384Sjkim 11238384Sjkim int CMS_uncompress(CMS_ContentInfo *cms, BIO *dcont, BIO *out, unsigned int flags); 12238384Sjkim 13238384Sjkim=head1 DESCRIPTION 14238384Sjkim 15238384SjkimCMS_uncompress() extracts and uncompresses the content from a CMS 16238384SjkimCompressedData structure B<cms>. B<data> is a BIO to write the content to and 17238384SjkimB<flags> is an optional set of flags. 18238384Sjkim 19238384SjkimThe B<dcont> parameter is used in the rare case where the compressed content 20238384Sjkimis detached. It will normally be set to NULL. 21238384Sjkim 22238384Sjkim=head1 NOTES 23238384Sjkim 24238384SjkimThe only currently supported compression algorithm is zlib: if the structure 25238384Sjkimindicates the use of any other algorithm an error is returned. 26238384Sjkim 27238384SjkimIf zlib support is not compiled into OpenSSL then CMS_uncompress() will always 28238384Sjkimreturn an error. 29238384Sjkim 30238384SjkimThe following flags can be passed in the B<flags> parameter. 31238384Sjkim 32238384SjkimIf the B<CMS_TEXT> flag is set MIME headers for type B<text/plain> are deleted 33238384Sjkimfrom the content. If the content is not of type B<text/plain> then an error is 34238384Sjkimreturned. 35238384Sjkim 36238384Sjkim=head1 RETURN VALUES 37238384Sjkim 38238384SjkimCMS_uncompress() returns either 1 for success or 0 for failure. The error can 39238384Sjkimbe obtained from ERR_get_error(3) 40238384Sjkim 41238384Sjkim=head1 BUGS 42238384Sjkim 43238384SjkimThe lack of single pass processing and the need to hold all data in memory as 44238384Sjkimmentioned in CMS_verify() also applies to CMS_decompress(). 45238384Sjkim 46238384Sjkim=head1 SEE ALSO 47238384Sjkim 48238384SjkimL<ERR_get_error(3)|ERR_get_error(3)>, L<CMS_compress(3)|CMS_compress(3)> 49238384Sjkim 50238384Sjkim=head1 HISTORY 51238384Sjkim 52238384SjkimCMS_uncompress() was added to OpenSSL 0.9.8 53238384Sjkim 54238384Sjkim=cut 55