From 9c74e415bf3ccd03075674c03d2c9386f6316387 Mon Sep 17 00:00:00 2001 From: schwarze <> Date: Wed, 11 Jun 2025 23:21:08 +0000 Subject: The functions SMIME_read_ASN1(3) and SMIME_write_ASN1(3) are no longer public, so delete their manual pages. OK tb@ --- src/lib/libcrypto/man/Makefile | 4 +- src/lib/libcrypto/man/SMIME_read_ASN1.3 | 124 ----------------------- src/lib/libcrypto/man/SMIME_write_ASN1.3 | 163 ------------------------------- 3 files changed, 1 insertion(+), 290 deletions(-) delete mode 100644 src/lib/libcrypto/man/SMIME_read_ASN1.3 delete mode 100644 src/lib/libcrypto/man/SMIME_write_ASN1.3 (limited to 'src/lib') diff --git a/src/lib/libcrypto/man/Makefile b/src/lib/libcrypto/man/Makefile index d026643e9d..2291d083cd 100644 --- a/src/lib/libcrypto/man/Makefile +++ b/src/lib/libcrypto/man/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.309 2025/06/09 12:43:53 schwarze Exp $ +# $OpenBSD: Makefile,v 1.310 2025/06/11 23:21:08 schwarze Exp $ .include @@ -291,11 +291,9 @@ MAN= \ RSA_size.3 \ SHA1.3 \ SMIME_crlf_copy.3 \ - 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 \ STACK_OF.3 \ diff --git a/src/lib/libcrypto/man/SMIME_read_ASN1.3 b/src/lib/libcrypto/man/SMIME_read_ASN1.3 deleted file mode 100644 index 320064567c..0000000000 --- a/src/lib/libcrypto/man/SMIME_read_ASN1.3 +++ /dev/null @@ -1,124 +0,0 @@ -.\" $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 -.\" -.\" This file was written by Dr. Stephen Henson . -.\" Copyright (c) 2002, 2006, 2008 The OpenSSL Project. All rights reserved. -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in -.\" the documentation and/or other materials provided with the -.\" distribution. -.\" -.\" 3. All advertising materials mentioning features or use of this -.\" software must display the following acknowledgment: -.\" "This product includes software developed by the OpenSSL Project -.\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" -.\" -.\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to -.\" endorse or promote products derived from this software without -.\" prior written permission. For written permission, please contact -.\" openssl-core@openssl.org. -.\" -.\" 5. Products derived from this software may not be called "OpenSSL" -.\" nor may "OpenSSL" appear in their names without prior written -.\" permission of the OpenSSL Project. -.\" -.\" 6. Redistributions of any form whatsoever must retain the following -.\" acknowledgment: -.\" "This product includes software developed by the OpenSSL Project -.\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY -.\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR -.\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, -.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED -.\" OF THE POSSIBILITY OF SUCH DAMAGE. -.\" -.Dd $Mdocdate: December 14 2021 $ -.Dt SMIME_READ_ASN1 3 -.Os -.Sh NAME -.Nm SMIME_read_ASN1 -.Nd generic S/MIME message parser -.Sh SYNOPSIS -.In openssl/asn1.h -.Ft ASN1_VALUE * -.Fo SMIME_read_ASN1 -.Fa "BIO *in_bio" -.Fa "BIO **out_bio" -.Fa "const ASN1_ITEM *it" -.Fc -.Sh DESCRIPTION -.Fn SMIME_read_ASN1 -reads a message in S/MIME format from -.Fa in_bio . -.Pp -If the message uses cleartext signing, the content is saved in a memory -.Vt BIO -which is written to -.Pf * Fa out_bio . -Otherwise, -.Pf * Fa out_bio -is set to -.Dv NULL . -.Pp -To support future functionality, if -.Fa out_bio -is not -.Dv NULL , -.Pf * Fa out_bio -should be initialized to -.Dv NULL -before calling -.Fn SMIME_read_ASN1 . -.Sh RETURN VALUES -.Fn SMIME_read_ASN1 -returns a newly allocated object of type -.Fa it -or -.Dv NULL -if an error occurred. -The error can be obtained from -.Xr ERR_get_error 3 . -.Sh SEE ALSO -.Xr ASN1_item_d2i_bio 3 , -.Xr BIO_f_base64 3 , -.Xr BIO_new 3 , -.Xr SMIME_read_CMS 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 -.Ox 4.5 . -.Sh BUGS -The MIME parser used by -.Fn SMIME_read_ASN1 -is somewhat primitive. -While it will handle most S/MIME messages, more complex compound -formats may not work. -.Pp -The parser assumes that the -structure is always base64 encoded, and it will not handle the case -where it is in binary format or uses quoted printable format. -.Pp -The use of a memory -to hold the signed content limits the size of the message which can -be processed due to memory restraints: a streaming single pass -option should be available. diff --git a/src/lib/libcrypto/man/SMIME_write_ASN1.3 b/src/lib/libcrypto/man/SMIME_write_ASN1.3 deleted file mode 100644 index a02fa58570..0000000000 --- a/src/lib/libcrypto/man/SMIME_write_ASN1.3 +++ /dev/null @@ -1,163 +0,0 @@ -.\" $OpenBSD: SMIME_write_ASN1.3,v 1.2 2023/05/01 07:28:11 tb 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: May 1 2023 $ -.Dt SMIME_WRITE_ASN1 3 -.Os -.Sh NAME -.Nm SMIME_write_ASN1 -.Nd generate an S/MIME message -.Sh SYNOPSIS -.In openssl/asn1.h -.Ft int -.Fo SMIME_write_ASN1 -.Fa "BIO *out_bio" -.Fa "ASN1_VALUE *val_in" -.Fa "BIO *in_bio" -.Fa "int flags" -.Fa "int ctype_nid" -.Fa "int econt_nid" -.Fa "STACK_OF(X509_ALGOR) *micalg" -.Fa "const ASN1_ITEM *it" -.Fc -.Sh DESCRIPTION -.Fn SMIME_write_ASN1 -generates an S/MIME message on -.Fa out_bio -by writing MIME 1.0 headers -followed by a BER- and base64-encoded serialization of -.Fa val_in , -which can be of the type -.Vt CMS_ContentInfo -or -.Vt PKCS7 -and has to match the -.Fa it -argument. -.Pp -The -.Fa flags -can be the logical OR of zero or more of the following bits: -.Bl -tag -width Ds -.It Dv PKCS7_REUSE_DIGEST -Skip the calls to -.Xr PKCS7_dataInit 3 -and -.Xr PKCS7_dataFinal 3 . -This flag has no effect unless -.Dv SMIME_DETACHED -is also set. -It is normally used if -.Fa out_bio -is already set up to calculate and finalize the digest when written through. -.It Dv SMIME_BINARY -If specified, this flag is passed through to -.Xr SMIME_crlf_copy 3 . -.It Dv SMIME_CRLFEOL -End MIME header lines with pairs of carriage return and newline characters. -By default, no carriage return characters are written -and header lines are ended with newline characters only. -.It Dv SMIME_DETACHED -Use cleartext signing. -Generate a -.Qq multipart/signed -S/MIME message using the -.Fa micalg -argument and ignoring the -.Fa ctype_nid -and -.Fa econt_nid -arguments. -The content is read from -.Fa in_bio . -If -.Fa in_bio -is a -.Dv NULL -pointer, this flag is ignored. -.Pp -If this flag is ignored or not specified, -the smime-type is chosen according to -.Fa ctype_nid -instead: -.Bl -tag -width Ds -.It Dv NID_pkcs7_enveloped -.Qq enveloped-data -.It Dv NID_pkcs7_signed -.Qq signed-receipt -if -.Fa econt_nid -is -.Dv NID_id_smime_ct_receipt -.br -.Qq signed-data -if -.Fa micalg -is not empty -.br -.Qq certs-only -if -.Fa micalg -is empty -.It Dv NID_id_smime_ct_compressedData -.Qq compressed-data -.El -.It Dv SMIME_OLDMIME -In Content-Type headers, use -.Qq application/x-pkcs7-mime -or -.Qq application/x-pkcs7-signature . -By default, -.Qq application/pkcs7-mime -or -.Qq application/pkcs7-signature -are used instead. -.It Dv SMIME_STREAM -Perform streaming by reading the content from -.Fa in_bio . -This only works if -.Dv SMIME_DETACHED -is not specified. -.It SMIME_TEXT -Prepend the line -.Qq Content-Type: text/plain -to the content. -This only makes sense if -.Dv SMIME_DETACHED -is also set. -It is ignored if the flag -.Dv SMIME_BINARY -is also set. -.El -.Sh RETURN VALUES -.Fn SMIME_write_ASN1 -is intended to return 1 on success or 0 on failure. -.Sh SEE ALSO -.Xr ASN1_item_i2d_bio 3 , -.Xr BIO_f_base64 3 , -.Xr BIO_new 3 , -.Xr SMIME_crlf_copy 3 , -.Xr SMIME_write_CMS 3 , -.Xr SMIME_write_PKCS7 3 , -.Xr X509_ALGOR_new 3 -.Sh HISTORY -.Fn SMIME_write_ASN1 -first appeared in OpenSSL 1.0.0 and has been available since -.Ox 4.9 . -.Sh BUGS -.Fn SMIME_write_ASN1 -ignores most errors and is likely to return 1 -even after producing corrupt or incomplete output. -- cgit v1.2.3-55-g6feb