summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/man/SMIME_read_CMS.3
diff options
context:
space:
mode:
authorschwarze <>2019-08-18 13:02:37 +0000
committerschwarze <>2019-08-18 13:02:37 +0000
commit93799276cd1bbad15495a2073272e538f2affd8e (patch)
tree0658a4d38515e513e616fbeacc27ff4764a33c43 /src/lib/libcrypto/man/SMIME_read_CMS.3
parentb10b0cfcd860f250f32febb85fd57cfc747f0146 (diff)
downloadopenbsd-93799276cd1bbad15495a2073272e538f2affd8e.tar.gz
openbsd-93799276cd1bbad15495a2073272e538f2affd8e.tar.bz2
openbsd-93799276cd1bbad15495a2073272e538f2affd8e.zip
minor cleanup:
* avoid jumping back and forth between use cases * delete duplicate information * and minor wording improvements
Diffstat (limited to 'src/lib/libcrypto/man/SMIME_read_CMS.3')
-rw-r--r--src/lib/libcrypto/man/SMIME_read_CMS.350
1 files changed, 15 insertions, 35 deletions
diff --git a/src/lib/libcrypto/man/SMIME_read_CMS.3 b/src/lib/libcrypto/man/SMIME_read_CMS.3
index 94bce42390..af2facf129 100644
--- a/src/lib/libcrypto/man/SMIME_read_CMS.3
+++ b/src/lib/libcrypto/man/SMIME_read_CMS.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: SMIME_read_CMS.3,v 1.3 2019/08/12 16:00:05 schwarze Exp $ 1.\" $OpenBSD: SMIME_read_CMS.3,v 1.4 2019/08/18 13:02:37 schwarze Exp $
2.\" full merge up to: OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100 2.\" full merge up to: OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
3.\" 3.\"
4.\" This file was written by Dr. Stephen Henson <steve@openssl.org>. 4.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
@@ -48,7 +48,7 @@
48.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 48.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
49.\" OF THE POSSIBILITY OF SUCH DAMAGE. 49.\" OF THE POSSIBILITY OF SUCH DAMAGE.
50.\" 50.\"
51.Dd $Mdocdate: August 12 2019 $ 51.Dd $Mdocdate: August 18 2019 $
52.Dt SMIME_READ_CMS 3 52.Dt SMIME_READ_CMS 3
53.Os 53.Os
54.Sh NAME 54.Sh NAME
@@ -63,40 +63,22 @@
63.Fc 63.Fc
64.Sh DESCRIPTION 64.Sh DESCRIPTION
65.Fn SMIME_read_CMS 65.Fn SMIME_read_CMS
66parses a message in S/MIME format. 66parses a message in S/MIME format from
67.Fa in .
67.Pp 68.Pp
68.Fa in 69If the message uses cleartext signing, the content is saved in a memory BIO
69is a
70.Vt BIO
71to read the message from.
72.Pp
73If cleartext signing is used, then the content is saved in a memory BIO
74which is written to 70which is written to
75.Pf * Fa bcont ;
76otherwise
77.Pf * Fa bcont
78is set to
79.Dv NULL .
80.Pp
81The parsed
82.Vt CMS_ContentInfo
83structure is returned, or
84.Dv NULL
85if an error occurred.
86.Pp
87If
88.Pf * Fa bcont 71.Pf * Fa bcont
89is not 72and which can then be passed to
90.Dv NULL ,
91then the message is clear text signed.
92.Pf * Fa bcont
93can then be passed to
94.Xr CMS_verify 3 73.Xr CMS_verify 3
95with the 74with the
96.Dv CMS_DETACHED 75.Dv CMS_DETACHED
97flag set. 76flag set.
98.Pp 77Otherwise,
99Otherwise the type of the returned structure can be determined using 78.Pf * Fa bcont
79is set to
80.Dv NULL
81and the type of the returned structure can be determined using
100.Xr CMS_get0_type 3 . 82.Xr CMS_get0_type 3 .
101.Pp 83.Pp
102To support future functionality if 84To support future functionality if
@@ -105,13 +87,11 @@ is not
105.Dv NULL , 87.Dv NULL ,
106.Pf * Fa bcont 88.Pf * Fa bcont
107should be initialized to 89should be initialized to
108.Dv NULL . 90.Dv NULL ,
109For example: 91for example:
110.Bd -literal -offset indent 92.Bd -literal -offset indent
111BIO *cont = NULL; 93BIO *cont = NULL;
112CMS_ContentInfo *cms; 94CMS_ContentInfo *cms = SMIME_read_CMS(in, &cont);
113
114cms = SMIME_read_CMS(in, &cont);
115.Ed 95.Ed
116.Sh RETURN VALUES 96.Sh RETURN VALUES
117.Fn SMIME_read_CMS 97.Fn SMIME_read_CMS
@@ -147,5 +127,5 @@ structure is always base64 encoded and will not handle the case
147where it is in binary format or uses quoted printable format. 127where it is in binary format or uses quoted printable format.
148.Pp 128.Pp
149The use of a memory BIO to hold the signed content limits the size of 129The use of a memory BIO to hold the signed content limits the size of
150message which can be processed due to memory restraints: a streaming 130the message which can be processed due to memory restraints: a streaming
151single pass option should be available. 131single pass option should be available.