summaryrefslogtreecommitdiff
path: root/lib/libcrypto/man/SMIME_text.3
blob: a4c96899255339ba04ba53e658cff5e2dd9d4102 (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
.\" $OpenBSD: SMIME_text.3,v 1.1 2021/12/14 15:22:49 schwarze Exp $
.\"
.\" Copyright (c) 2021 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: December 14 2021 $
.Dt SMIME_TEXT 3
.Os
.Sh NAME
.Nm SMIME_text
.Nd remove text/plain MIME headers
.Sh SYNOPSIS
.In openssl/asn1.h
.Ft int
.Fo SMIME_text
.Fa "BIO *in_bio"
.Fa "BIO *out_bio"
.Fc
.Sh DESCRIPTION
.Fn SMIME_text
reads MIME headers from
.Fa in_bio ,
checks that the content type is
.Dq text/plain ,
discards the MIME headers,
and copies the text that follows the headers from
.Fa in_bio
to
.Fa out_bio .
.Sh RETURN VALUES
.Fn SMIME_text
returns 1 on success or 0 if memory allocation, reading the input,
or parsing the MIME headers fails, if there is no
.Dq content-type
header, or if the content type is not
.Dq text/plain .
.Sh SEE ALSO
.Xr SMIME_crlf_copy 3 ,
.Xr SMIME_read_ASN1 3
.Sh HISTORY
.Fn SMIME_text
first appeared in OpenSSL 1.0.0 and has been available since
.Ox 4.9 .
.Sh CAVEATS
.Fn SMIME_text
does not support non-blocking BIOs.