-.\" $OpenBSD: SMIME_crlf_copy.3,v 1.1 2021/12/13 13:46:09 schwarze Exp $
+.\" $OpenBSD: SMIME_crlf_copy.3,v 1.2 2021/12/14 15:22:49 schwarze Exp $
.\"
.\" Copyright (c) 2021 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" 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 13 2021 $
+.Dd $Mdocdate: December 14 2021 $
.Dt SMIME_CRLF_COPY 3
.Os
.Sh NAME
.Xr BIO_push 3 ,
.Xr BIO_read 3 ,
.Xr i2d_ASN1_bio_stream 3 ,
+.Xr SMIME_text 3 ,
.Xr SMIME_write_ASN1 3
.Sh HISTORY
.Fn SMIME_crlf_copy
-.\" $OpenBSD: SMIME_read_ASN1.3,v 1.1 2021/12/14 14:30:50 schwarze Exp $
+.\" $OpenBSD: SMIME_read_ASN1.3,v 1.2 2021/12/14 15:22:49 schwarze Exp $
.\" full merge up to:
.\" OpenSSL SMIME_read_PKCS7.pod 83cf7abf May 29 13:07:08 2018 +0100
.\" OpenSSL SMIME_read_CMS.pod b97fdb57 Nov 11 09:33:09 2016 +0100
.Xr BIO_f_base64 3 ,
.Xr BIO_new 3 ,
.Xr SMIME_read_CMS 3 ,
-.Xr SMIME_read_PKCS7 3
+.Xr SMIME_read_PKCS7 3 ,
+.Xr SMIME_text 3
.Sh HISTORY
.Fn SMIME_read_ASN1
first appeared in OpenSSL 0.9.8h and has been available since
--- /dev/null
+.\" $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.