xref: /netbsd-src/crypto/external/bsd/openssl/dist/doc/man3/CMS_uncompress.pod (revision b0d1725196a7921d003d2c66a14f186abda4176b)
113d40330Schristos=pod
213d40330Schristos
313d40330Schristos=head1 NAME
413d40330Schristos
513d40330SchristosCMS_uncompress - uncompress a CMS CompressedData structure
613d40330Schristos
713d40330Schristos=head1 SYNOPSIS
813d40330Schristos
913d40330Schristos #include <openssl/cms.h>
1013d40330Schristos
1113d40330Schristos int CMS_uncompress(CMS_ContentInfo *cms, BIO *dcont, BIO *out, unsigned int flags);
1213d40330Schristos
1313d40330Schristos=head1 DESCRIPTION
1413d40330Schristos
1513d40330SchristosCMS_uncompress() extracts and uncompresses the content from a CMS
1613d40330SchristosCompressedData structure B<cms>. B<data> is a BIO to write the content to and
1713d40330SchristosB<flags> is an optional set of flags.
1813d40330Schristos
1913d40330SchristosThe B<dcont> parameter is used in the rare case where the compressed content
2013d40330Schristosis detached. It will normally be set to NULL.
2113d40330Schristos
2213d40330Schristos=head1 NOTES
2313d40330Schristos
2413d40330SchristosThe only currently supported compression algorithm is zlib: if the structure
2513d40330Schristosindicates the use of any other algorithm an error is returned.
2613d40330Schristos
2713d40330SchristosIf zlib support is not compiled into OpenSSL then CMS_uncompress() will always
2813d40330Schristosreturn an error.
2913d40330Schristos
3013d40330SchristosThe following flags can be passed in the B<flags> parameter.
3113d40330Schristos
3213d40330SchristosIf the B<CMS_TEXT> flag is set MIME headers for type B<text/plain> are deleted
3313d40330Schristosfrom the content. If the content is not of type B<text/plain> then an error is
3413d40330Schristosreturned.
3513d40330Schristos
3613d40330Schristos=head1 RETURN VALUES
3713d40330Schristos
3813d40330SchristosCMS_uncompress() returns either 1 for success or 0 for failure. The error can
3913d40330Schristosbe obtained from ERR_get_error(3)
4013d40330Schristos
4113d40330Schristos=head1 BUGS
4213d40330Schristos
4313d40330SchristosThe lack of single pass processing and the need to hold all data in memory as
4413d40330Schristosmentioned in CMS_verify() also applies to CMS_decompress().
4513d40330Schristos
4613d40330Schristos=head1 SEE ALSO
4713d40330Schristos
4813d40330SchristosL<ERR_get_error(3)>, L<CMS_compress(3)>
4913d40330Schristos
5013d40330Schristos=head1 COPYRIGHT
5113d40330Schristos
5213d40330SchristosCopyright 2008-2016 The OpenSSL Project Authors. All Rights Reserved.
5313d40330Schristos
54*b0d17251SchristosLicensed under the Apache License 2.0 (the "License").  You may not use
5513d40330Schristosthis file except in compliance with the License.  You can obtain a copy
5613d40330Schristosin the file LICENSE in the source distribution or at
5713d40330SchristosL<https://www.openssl.org/source/license.html>.
5813d40330Schristos
5913d40330Schristos=cut
60