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