xref: /freebsd/crypto/openssl/doc/man3/CMS_uncompress.pod (revision b077aed33b7b6aefca7b17ddb250cf521f938613)
1e71b7053SJung-uk Kim=pod
2e71b7053SJung-uk Kim
3e71b7053SJung-uk Kim=head1 NAME
4e71b7053SJung-uk Kim
5e71b7053SJung-uk KimCMS_uncompress - uncompress a CMS CompressedData structure
6e71b7053SJung-uk Kim
7e71b7053SJung-uk Kim=head1 SYNOPSIS
8e71b7053SJung-uk Kim
9e71b7053SJung-uk Kim #include <openssl/cms.h>
10e71b7053SJung-uk Kim
11e71b7053SJung-uk Kim int CMS_uncompress(CMS_ContentInfo *cms, BIO *dcont, BIO *out, unsigned int flags);
12e71b7053SJung-uk Kim
13e71b7053SJung-uk Kim=head1 DESCRIPTION
14e71b7053SJung-uk Kim
15e71b7053SJung-uk KimCMS_uncompress() extracts and uncompresses the content from a CMS
16e71b7053SJung-uk KimCompressedData structure B<cms>. B<data> is a BIO to write the content to and
17e71b7053SJung-uk KimB<flags> is an optional set of flags.
18e71b7053SJung-uk Kim
19e71b7053SJung-uk KimThe B<dcont> parameter is used in the rare case where the compressed content
20e71b7053SJung-uk Kimis detached. It will normally be set to NULL.
21e71b7053SJung-uk Kim
22e71b7053SJung-uk Kim=head1 NOTES
23e71b7053SJung-uk Kim
24e71b7053SJung-uk KimThe only currently supported compression algorithm is zlib: if the structure
25e71b7053SJung-uk Kimindicates the use of any other algorithm an error is returned.
26e71b7053SJung-uk Kim
27e71b7053SJung-uk KimIf zlib support is not compiled into OpenSSL then CMS_uncompress() will always
28e71b7053SJung-uk Kimreturn an error.
29e71b7053SJung-uk Kim
30e71b7053SJung-uk KimThe following flags can be passed in the B<flags> parameter.
31e71b7053SJung-uk Kim
32e71b7053SJung-uk KimIf the B<CMS_TEXT> flag is set MIME headers for type B<text/plain> are deleted
33e71b7053SJung-uk Kimfrom the content. If the content is not of type B<text/plain> then an error is
34e71b7053SJung-uk Kimreturned.
35e71b7053SJung-uk Kim
36e71b7053SJung-uk Kim=head1 RETURN VALUES
37e71b7053SJung-uk Kim
38e71b7053SJung-uk KimCMS_uncompress() returns either 1 for success or 0 for failure. The error can
39e71b7053SJung-uk Kimbe obtained from ERR_get_error(3)
40e71b7053SJung-uk Kim
41e71b7053SJung-uk Kim=head1 BUGS
42e71b7053SJung-uk Kim
43e71b7053SJung-uk KimThe lack of single pass processing and the need to hold all data in memory as
44e71b7053SJung-uk Kimmentioned in CMS_verify() also applies to CMS_decompress().
45e71b7053SJung-uk Kim
46e71b7053SJung-uk Kim=head1 SEE ALSO
47e71b7053SJung-uk Kim
48e71b7053SJung-uk KimL<ERR_get_error(3)>, L<CMS_compress(3)>
49e71b7053SJung-uk Kim
50e71b7053SJung-uk Kim=head1 COPYRIGHT
51e71b7053SJung-uk Kim
52e71b7053SJung-uk KimCopyright 2008-2016 The OpenSSL Project Authors. All Rights Reserved.
53e71b7053SJung-uk Kim
54*b077aed3SPierre ProncheryLicensed under the Apache License 2.0 (the "License").  You may not use
55e71b7053SJung-uk Kimthis file except in compliance with the License.  You can obtain a copy
56e71b7053SJung-uk Kimin the file LICENSE in the source distribution or at
57e71b7053SJung-uk KimL<https://www.openssl.org/source/license.html>.
58e71b7053SJung-uk Kim
59e71b7053SJung-uk Kim=cut
60