summaryrefslogtreecommitdiff
path: root/lib/libcrypto/man/CMS_uncompress.3
blob: c651f24de2f1699125426674a3a673cf5403d537 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
.Dd $Mdocdate: November 11 2015 $
.Dt CMS_UNCOMPRESS 3
.Os
.Sh NAME
.Nm CMS_uncompress
.Nd uncompress a CMS CompressedData structure
.Sh SYNOPSIS
.In openssl/cms.h
.Ft int
.Fo CMS_uncompress
.Fa "CMS_ContentInfo *cms"
.Fa "BIO *dcont"
.Fa "BIO *out"
.Fa "unsigned int flags"
.Fc
.Sh DESCRIPTION
.Fn CMS_uncompress
extracts and uncompresses the content from a CMS CompressedData
structure
.Fa cms .
.Fa data
is a
.Vt BIO
to write the content to and
.Fa flags
is an optional set of flags.
.Pp
The
.Fa dcont
parameter is used in the rare case where the compressed content is
detached.
It will normally be set to
.Dv NULL .
.Sh NOTES
The only currently supported compression algorithm is zlib: if the
structure indicates the use of any other algorithm, an error is returned.
.Pp
If zlib support is not compiled into OpenSSL, then
.Fn CMS_uncompress
will always return an error.
.Pp
The following flags can be passed in the
.Fa flags
parameter:
.Pp
If the
.Dv CMS_TEXT
flag is set, MIME headers for type
.Sy text/plain
are deleted from the content.
If the content is not of type
.Sy text/plain ,
then an error is returned.
.Sh RETURN VALUES
.Fn CMS_uncompress
returns either 1 for success or 0 for failure.
The error can be obtained from
.Xr ERR_get_error 3 .
.Sh SEE ALSO
.Xr CMS_compress 3 ,
.Xr ERR_get_error 3
.Sh HISTORY
.Fn CMS_uncompress
was added to OpenSSL 0.9.8.
.Sh BUGS
The lack of single pass processing and the need to hold all data in
memory as mentioned in
.Xr CMS_verify 3
also applies to
.Xr CMS_decompress 3 .