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