From: schwarze Date: Tue, 14 Dec 2021 15:22:49 +0000 (+0000) Subject: new manual page SMIME_text(3) X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=ac19264ff13a27b9362f8977c04bdf489087f7f0;p=openbsd new manual page SMIME_text(3) --- diff --git a/lib/libcrypto/man/Makefile b/lib/libcrypto/man/Makefile index 98f2cb6b803..2986652b794 100644 --- a/lib/libcrypto/man/Makefile +++ b/lib/libcrypto/man/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.227 2021/12/14 14:30:50 schwarze Exp $ +# $OpenBSD: Makefile,v 1.228 2021/12/14 15:22:49 schwarze Exp $ .include @@ -283,6 +283,7 @@ MAN= \ SMIME_read_ASN1.3 \ SMIME_read_CMS.3 \ SMIME_read_PKCS7.3 \ + SMIME_text.3 \ SMIME_write_ASN1.3 \ SMIME_write_CMS.3 \ SMIME_write_PKCS7.3 \ diff --git a/lib/libcrypto/man/SMIME_crlf_copy.3 b/lib/libcrypto/man/SMIME_crlf_copy.3 index defee581fdb..3062634f386 100644 --- a/lib/libcrypto/man/SMIME_crlf_copy.3 +++ b/lib/libcrypto/man/SMIME_crlf_copy.3 @@ -1,4 +1,4 @@ -.\" $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 .\" @@ -14,7 +14,7 @@ .\" 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 @@ -79,6 +79,7 @@ is intended to return 1 on success or 0 on failure. .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 diff --git a/lib/libcrypto/man/SMIME_read_ASN1.3 b/lib/libcrypto/man/SMIME_read_ASN1.3 index 2a04ccb0d2f..320064567c0 100644 --- a/lib/libcrypto/man/SMIME_read_ASN1.3 +++ b/lib/libcrypto/man/SMIME_read_ASN1.3 @@ -1,4 +1,4 @@ -.\" $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 @@ -101,7 +101,8 @@ The error can be obtained from .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 diff --git a/lib/libcrypto/man/SMIME_text.3 b/lib/libcrypto/man/SMIME_text.3 new file mode 100644 index 00000000000..a4c96899255 --- /dev/null +++ b/lib/libcrypto/man/SMIME_text.3 @@ -0,0 +1,57 @@ +.\" $OpenBSD: SMIME_text.3,v 1.1 2021/12/14 15:22:49 schwarze Exp $ +.\" +.\" Copyright (c) 2021 Ingo Schwarze +.\" +.\" 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.