summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/man/CMS_compress.3
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/lib/libcrypto/man/CMS_compress.3110
1 files changed, 0 insertions, 110 deletions
diff --git a/src/lib/libcrypto/man/CMS_compress.3 b/src/lib/libcrypto/man/CMS_compress.3
deleted file mode 100644
index 1330464441..0000000000
--- a/src/lib/libcrypto/man/CMS_compress.3
+++ /dev/null
@@ -1,110 +0,0 @@
1.Dd $Mdocdate: November 11 2015 $
2.Dt CMS_COMPRESS 3
3.Os
4.Sh NAME
5.Nm CMS_compress
6.Nd create a CMS CompressedData structure
7.Sh SYNOPSIS
8.In openssl/cms.h
9.Ft CMS_ContentInfo *
10.Fo CMS_compress
11.Fa "BIO *in"
12.Fa "int comp_nid"
13.Fa "unsigned int flags"
14.Fc
15.Sh DESCRIPTION
16.Fn CMS_compress
17creates and returns a CMS CompressedData structure.
18.Fa comp_nid
19is the compression algorithm to use or
20.Dv NID_undef
21to use the default algorithm (zlib compression).
22.Fa in
23is the content to be compressed.
24.Fa flags
25is an optional set of flags.
26.Sh NOTES
27The only currently supported compression algorithm is zlib using the NID
28.Dv NID_zlib_compression .
29.Pp
30If zlib support is not compiled into OpenSSL then
31.Fn CMS_compress
32will return an error.
33.Pp
34If the
35.Dv CMS_TEXT
36flag is set, MIME headers for type
37.Sy text/plain
38are prepended to the data.
39.Pp
40Normally the supplied content is translated into MIME canonical format
41(as required by the S/MIME specifications); if
42.Dv CMS_BINARY
43is set, no translation occurs.
44This option should be used if the supplied data is in binary format;
45otherwise the translation will corrupt it.
46If
47.Dv CMS_BINARY
48is set then
49.Dv CMS_TEXT
50is ignored.
51.Pp
52If the
53.Dv CMS_STREAM
54flag is set a partial
55.Vt CMS_ContentInfo
56structure is returned suitable for streaming I/O: no data is read from
57the
58.Vt BIO
59.Fa in .
60.Pp
61The compressed data is included in the
62.Vt CMS_ContentInfo
63structure, unless
64.Dv CMS_DETACHED
65is set, in which case it is omitted.
66This is rarely used in practice and is not supported by
67.Xr SMIME_write_CMS 3 .
68.Sh NOTES
69If the flag
70.Dv CMS_STREAM
71is set, the returned
72.Vt CMS_ContentInfo
73structure is
74.Em not
75complete and outputting its contents via a function that does not
76properly finalize the
77.Vt CMS_ContentInfo
78structure will give unpredictable results.
79.Pp
80Several functions including
81.Xr SMIME_write_CMS 3 ,
82.Xr i2d_CMS_bio_stream 3 ,
83.Xr PEM_write_bio_CMS_stream 3
84finalize the structure.
85Alternatively finalization can be performed by obtaining the streaming
86ASN1
87.Vt BIO
88directly using
89.Xr BIO_new_CMS 3 .
90.Pp
91Additional compression parameters such as the zlib compression level
92cannot currently be set.
93.Sh RETURN VALUES
94.Fn CMS_compress
95returns either a
96.Vt CMS_ContentInfo
97structure or
98.Dv NULL
99if an error occurred.
100The error can be obtained from
101.Xr ERR_get_error 3 .
102.Sh SEE ALSO
103.Xr CMS_uncompress 3 ,
104.Xr ERR_get_error 3
105.Sh HISTORY
106.Fn CMS_compress
107was added to OpenSSL 0.9.8.
108The
109.Dv CMS_STREAM
110flag was first supported in OpenSSL 1.0.0.