From 780bab841f81b8ab2db5eab3ee137a26048eb18a Mon Sep 17 00:00:00 2001 From: schwarze <> Date: Wed, 16 Jul 2025 17:59:10 +0000 Subject: Undocument PEM_X509_INFO_read(3), X509_PKEY_new(3) and X509_PKEY_free(3) because tb@ removed them from Symbols.list rev. 1.220 today. --- src/lib/libcrypto/man/Makefile | 3 +- src/lib/libcrypto/man/PEM_ASN1_read.3 | 6 +- src/lib/libcrypto/man/PEM_X509_INFO_read.3 | 41 ++++------- src/lib/libcrypto/man/PEM_bytes_read_bio.3 | 6 +- src/lib/libcrypto/man/PEM_read.3 | 6 +- src/lib/libcrypto/man/PEM_read_bio_PrivateKey.3 | 6 +- src/lib/libcrypto/man/X509_INFO_new.3 | 9 ++- src/lib/libcrypto/man/X509_PKEY_new.3 | 93 ------------------------- src/lib/libcrypto/man/X509_new.3 | 5 +- 9 files changed, 31 insertions(+), 144 deletions(-) delete mode 100644 src/lib/libcrypto/man/X509_PKEY_new.3 (limited to 'src/lib/libcrypto') diff --git a/src/lib/libcrypto/man/Makefile b/src/lib/libcrypto/man/Makefile index 2291d083cd..13703c4426 100644 --- a/src/lib/libcrypto/man/Makefile +++ b/src/lib/libcrypto/man/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.310 2025/06/11 23:21:08 schwarze Exp $ +# $OpenBSD: Makefile,v 1.311 2025/07/16 17:59:10 schwarze Exp $ .include @@ -326,7 +326,6 @@ MAN= \ X509_NAME_new.3 \ X509_NAME_print_ex.3 \ X509_OBJECT_get0_X509.3 \ - X509_PKEY_new.3 \ X509_PUBKEY_new.3 \ X509_PURPOSE_set.3 \ X509_REQ_add1_attr.3 \ diff --git a/src/lib/libcrypto/man/PEM_ASN1_read.3 b/src/lib/libcrypto/man/PEM_ASN1_read.3 index 7e2a407221..016007d405 100644 --- a/src/lib/libcrypto/man/PEM_ASN1_read.3 +++ b/src/lib/libcrypto/man/PEM_ASN1_read.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: PEM_ASN1_read.3,v 1.3 2025/06/08 22:40:30 schwarze Exp $ +.\" $OpenBSD: PEM_ASN1_read.3,v 1.4 2025/07/16 17:59:10 schwarze Exp $ .\" .\" Copyright (c) 2020 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: June 8 2025 $ +.Dd $Mdocdate: July 16 2025 $ .Dt PEM_ASN1_READ 3 .Os .Sh NAME @@ -166,7 +166,7 @@ Additional types of errors can result from .Xr PEM_read 3 , .Xr PEM_read_bio_PrivateKey 3 , .Xr PEM_read_SSL_SESSION 3 , -.Xr PEM_X509_INFO_read 3 +.Xr PEM_X509_INFO_read_bio 3 .Sh HISTORY These functions first appeared in SSLeay 0.5.1 and have been available since diff --git a/src/lib/libcrypto/man/PEM_X509_INFO_read.3 b/src/lib/libcrypto/man/PEM_X509_INFO_read.3 index 572d5c082e..8357e8dfb3 100644 --- a/src/lib/libcrypto/man/PEM_X509_INFO_read.3 +++ b/src/lib/libcrypto/man/PEM_X509_INFO_read.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: PEM_X509_INFO_read.3,v 1.5 2025/06/08 22:40:30 schwarze Exp $ +.\" $OpenBSD: PEM_X509_INFO_read.3,v 1.6 2025/07/16 17:59:10 schwarze Exp $ .\" .\" Copyright (c) 2020 Ingo Schwarze .\" @@ -14,24 +14,16 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: June 8 2025 $ +.Dd $Mdocdate: July 16 2025 $ .Dt PEM_X509_INFO_READ 3 .Os .Sh NAME -.Nm PEM_X509_INFO_read , .Nm PEM_X509_INFO_read_bio .Nd PEM and DER decode X.509 certificates, private keys, and revocation lists .Sh SYNOPSIS .Lb libcrypto .In openssl/pem.h .Ft STACK_OF(X509_INFO) * -.Fo PEM_X509_INFO_read -.Fa "FILE *in_fp" -.Fa "STACK_OF(X509_INFO) *sk" -.Fa "pem_password_cb *cb" -.Fa "void *u" -.Fc -.Ft STACK_OF(X509_INFO) * .Fo PEM_X509_INFO_read_bio .Fa "BIO *in_bp" .Fa "STACK_OF(X509_INFO) *sk" @@ -39,13 +31,11 @@ .Fa "void *u" .Fc .Sh DESCRIPTION -These functions read zero or more objects +This function reads zero or more objects related to X.509 certificates from -.Fa in_fp -or .Fa in_bp , -perform both PEM and DER decoding, -and wrap the resulting objects in newly allocated +performs both PEM and DER decoding, +and wraps the resulting objects in newly allocated .Vt X509_INFO containers. .Pp @@ -110,11 +100,11 @@ during the same call are deleted again and .Fa sk is left unchanged. .Sh RETURN VALUES -These functions return a pointer to the stack +This function returns a pointer to the stack the objects read were pushed onto or .Dv NULL if an error occurs. -They fail if +It fails if .Xr PEM_read_bio 3 , .Xr PEM_get_EVP_CIPHER_INFO 3 , .Xr PEM_do_header 3 , @@ -129,9 +119,6 @@ include: .Bl -tag -width Ds .It Dv ERR_R_ASN1_LIB Qq "ASN1 lib" DER decoding of a PEM object failed. -.It Dv ERR_R_BUF_LIB Qq BUF lib -.Fn PEM_X509_INFO_read -failed to set up a temporary BIO, for example because memory was exhausted. .It Dv ERR_R_MALLOC_FAILURE Qq "malloc failure" .Fn PEM_X509_INFO_read_bio failed to allocate a new @@ -148,7 +135,7 @@ Additional types of errors can result from and .Xr PEM_do_header 3 . .Pp -After these functions failed due to memory exhaustion, +After this function failed due to memory exhaustion, .Xr ERR_get_error 3 may sometimes return 0 anyway. .Sh SEE ALSO @@ -163,14 +150,10 @@ may sometimes return 0 anyway. .Xr X509_CRL_new 3 , .Xr X509_INFO_new 3 , .Xr X509_LOOKUP_new 3 , -.Xr X509_new 3 , -.Xr X509_PKEY_new 3 +.Xr X509_new 3 .Sh HISTORY -.Fn PEM_X509_INFO_read -first appeared in SSLeay 0.5.1 and .Fn PEM_X509_INFO_read_bio -in SSLeay 0.6.0. -Both functions have been available since +first appeared in SSLeay 0.6.0 and has been available since .Ox 2.4 . .Sh CAVEATS It is not an error @@ -185,6 +168,6 @@ a newly allocated, empty stack is returned. The only way to detect this situation is by comparing the number of objects on the stack before and after the call. .Sh BUGS -When reaching the end of the input, these functions call +When reaching the end of the input, this function calls .Xr ERR_clear_error 3 , -which may hide errors that occurred before calling these functions. +which may hide errors that occurred before calling it. diff --git a/src/lib/libcrypto/man/PEM_bytes_read_bio.3 b/src/lib/libcrypto/man/PEM_bytes_read_bio.3 index 08bca3b193..69cb26ce8d 100644 --- a/src/lib/libcrypto/man/PEM_bytes_read_bio.3 +++ b/src/lib/libcrypto/man/PEM_bytes_read_bio.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: PEM_bytes_read_bio.3,v 1.7 2025/06/08 22:40:30 schwarze Exp $ +.\" $OpenBSD: PEM_bytes_read_bio.3,v 1.8 2025/07/16 17:59:10 schwarze Exp $ .\" selective merge up to: .\" OpenSSL PEM_bytes_read_bio.pod 7671342e Feb 29 15:47:12 2016 -0600 .\" @@ -65,7 +65,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED .\" OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd $Mdocdate: June 8 2025 $ +.Dd $Mdocdate: July 16 2025 $ .Dt PEM_BYTES_READ_BIO 3 .Os .Sh NAME @@ -176,7 +176,7 @@ Additional types of errors can result from .Xr PEM_ASN1_read 3 , .Xr PEM_read 3 , .Xr PEM_read_bio_PrivateKey 3 , -.Xr PEM_X509_INFO_read 3 +.Xr PEM_X509_INFO_read_bio 3 .Sh STANDARDS RFC 1421: Privacy Enhancement for Internet Electronic Mail (PEM), Part I .Sh HISTORY diff --git a/src/lib/libcrypto/man/PEM_read.3 b/src/lib/libcrypto/man/PEM_read.3 index 6221432b9f..de93b3e903 100644 --- a/src/lib/libcrypto/man/PEM_read.3 +++ b/src/lib/libcrypto/man/PEM_read.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: PEM_read.3,v 1.16 2025/06/08 22:40:30 schwarze Exp $ +.\" $OpenBSD: PEM_read.3,v 1.17 2025/07/16 17:59:10 schwarze Exp $ .\" full merge up to: OpenSSL 83cf7abf May 29 13:07:08 2018 +0100 .\" .\" This file is a derived work. @@ -66,7 +66,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED .\" OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd $Mdocdate: June 8 2025 $ +.Dd $Mdocdate: July 16 2025 $ .Dt PEM_READ 3 .Os .Sh NAME @@ -396,7 +396,7 @@ to fail may differ. .Xr PEM_read_SSL_SESSION 3 , .Xr PEM_write_bio_CMS_stream 3 , .Xr PEM_write_bio_PKCS7_stream 3 , -.Xr PEM_X509_INFO_read 3 +.Xr PEM_X509_INFO_read_bio 3 .Sh HISTORY .Fn PEM_write , .Fn PEM_read , diff --git a/src/lib/libcrypto/man/PEM_read_bio_PrivateKey.3 b/src/lib/libcrypto/man/PEM_read_bio_PrivateKey.3 index d0b4a3659b..9ef136de7e 100644 --- a/src/lib/libcrypto/man/PEM_read_bio_PrivateKey.3 +++ b/src/lib/libcrypto/man/PEM_read_bio_PrivateKey.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: PEM_read_bio_PrivateKey.3,v 1.24 2025/06/08 22:40:30 schwarze Exp $ +.\" $OpenBSD: PEM_read_bio_PrivateKey.3,v 1.25 2025/07/16 17:59:10 schwarze Exp $ .\" full merge up to: .\" OpenSSL man3/PEM_read_bio_PrivateKey.pod 18bad535 Apr 9 15:13:55 2019 +0100 .\" OpenSSL man3/PEM_read_CMS.pod 83cf7abf May 29 13:07:08 2018 +0100 @@ -51,7 +51,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED .\" OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd $Mdocdate: June 8 2025 $ +.Dd $Mdocdate: July 16 2025 $ .Dt PEM_READ_BIO_PRIVATEKEY 3 .Os .Sh NAME @@ -1184,7 +1184,7 @@ pass_cb(char *buf, int size, int rwflag, void *u) .Xr PEM_read_SSL_SESSION 3 , .Xr PEM_write_bio_CMS_stream 3 , .Xr PEM_write_bio_PKCS7_stream 3 , -.Xr PEM_X509_INFO_read 3 , +.Xr PEM_X509_INFO_read_bio 3 , .Xr RSA_new 3 , .Xr X509_CRL_new 3 , .Xr X509_REQ_new 3 , diff --git a/src/lib/libcrypto/man/X509_INFO_new.3 b/src/lib/libcrypto/man/X509_INFO_new.3 index cecfcad867..38bf6fe55c 100644 --- a/src/lib/libcrypto/man/X509_INFO_new.3 +++ b/src/lib/libcrypto/man/X509_INFO_new.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: X509_INFO_new.3,v 1.4 2025/06/08 22:40:30 schwarze Exp $ +.\" $OpenBSD: X509_INFO_new.3,v 1.5 2025/07/16 17:59:10 schwarze Exp $ .\" Copyright (c) 2019 Ingo Schwarze .\" .\" Permission to use, copy, modify, and distribute this software for any @@ -13,7 +13,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: June 8 2025 $ +.Dd $Mdocdate: July 16 2025 $ .Dt X509_INFO_NEW 3 .Os .Sh NAME @@ -61,10 +61,9 @@ object or .Dv NULL if an error occurs. .Sh SEE ALSO -.Xr PEM_X509_INFO_read 3 , +.Xr PEM_X509_INFO_read_bio 3 , .Xr X509_CRL_new 3 , -.Xr X509_new 3 , -.Xr X509_PKEY_new 3 +.Xr X509_new 3 .Sh HISTORY .Fn X509_INFO_new and diff --git a/src/lib/libcrypto/man/X509_PKEY_new.3 b/src/lib/libcrypto/man/X509_PKEY_new.3 deleted file mode 100644 index 73ae41ac19..0000000000 --- a/src/lib/libcrypto/man/X509_PKEY_new.3 +++ /dev/null @@ -1,93 +0,0 @@ -.\" $OpenBSD: X509_PKEY_new.3,v 1.2 2025/06/08 22:40:30 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: June 8 2025 $ -.Dt X509_PKEY_NEW 3 -.Os -.Sh NAME -.Nm X509_PKEY_new , -.Nm X509_PKEY_free -.Nd X.509 private key wrapper object -.Sh SYNOPSIS -.Lb libcrypto -.In openssl/x509.h -.Ft X509_PKEY * -.Fn X509_PKEY_new void -.Ft void -.Fn X509_PKEY_free "X509_PKEY *wrapper" -.Sh DESCRIPTION -.Vt X509_PKEY -is a reference-counted wrapper object that can store -.Bl -bullet -width 1n -.It -a pointer to an encrypted and ASN.1-encoded private key -.It -a pointer to an -.Vt EVP_PKEY -object representing the same key in decrypted form -.It -a pointer to an -.Vt X509_ALGOR -object identifying the algorithm used by the key -.El -.Pp -The object may contain only the encrypted key or only the decrypted -key or both. -.Pp -.Vt X509_PKEY -is used as a sub-object of the -.Vt X509_INFO -object created by -.Xr PEM_X509_INFO_read_bio 3 -if the PEM file contains any RSA, DSA, or EC PRIVATE KEY object. -.Pp -.Fn X509_PKEY_new -allocates and initializes an empty -.Vt X509_PKEY -object and sets its reference count to 1. -.Pp -.Fn X509_PKEY_free -decrements the reference count of the -.Fa wrapper -object by 1. -If the reference count reaches 0, -it frees all internal objects allocated by the -.Fa wrapper -as well as the storage needed for the -.Fa wrapper -object itself. -If -.Fa wrapper -is a -.Dv NULL -pointer, no action occurs. -.Sh RETURN VALUES -.Fn X509_PKEY_new -returns a pointer to the new -.Vt X509_PKEY -object or -.Dv NULL -if memory allocation fails. -.Sh SEE ALSO -.Xr EVP_PKEY_new 3 , -.Xr PEM_X509_INFO_read 3 , -.Xr X509_INFO_new 3 -.Sh HISTORY -.Fn X509_PKEY_new -and -.Fn X509_PKEY_free -first appeared in SSLeay 0.6.0 and have been available since -.Ox 2.4 . diff --git a/src/lib/libcrypto/man/X509_new.3 b/src/lib/libcrypto/man/X509_new.3 index f7d2c09040..b6140b24b0 100644 --- a/src/lib/libcrypto/man/X509_new.3 +++ b/src/lib/libcrypto/man/X509_new.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: X509_new.3,v 1.46 2025/06/08 22:40:30 schwarze Exp $ +.\" $OpenBSD: X509_new.3,v 1.47 2025/07/16 17:59:10 schwarze Exp $ .\" full merge up to: OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400 .\" .\" This file is a derived work. @@ -66,7 +66,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED .\" OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd $Mdocdate: June 8 2025 $ +.Dd $Mdocdate: July 16 2025 $ .Dt X509_NEW 3 .Os .Sh NAME @@ -231,7 +231,6 @@ if an error occurs. .Xr X509_LOOKUP_new 3 , .Xr X509_NAME_new 3 , .Xr X509_OBJECT_new 3 , -.Xr X509_PKEY_new 3 , .Xr X509_print_ex 3 , .Xr X509_PUBKEY_new 3 , .Xr X509_PURPOSE_set 3 , -- cgit v1.2.3-55-g6feb