From 1fa3bebf3abe736a6434d01a8d436d1d04b657bb Mon Sep 17 00:00:00 2001 From: tb Date: Sat, 2 Mar 2024 09:21:24 +0000 Subject: [PATCH] Remove BIO_dump_*{cb,fp}() These were disabled and the internals that need to remain were fixed. Time for this garbage to go. ok jsing --- lib/libcrypto/Symbols.list | 4 ---- lib/libcrypto/Symbols.namespace | 2 -- lib/libcrypto/bio/b_dump.c | 38 +----------------------------- lib/libcrypto/bio/bio.h | 10 +++----- lib/libcrypto/hidden/openssl/bio.h | 4 +--- 5 files changed, 5 insertions(+), 53 deletions(-) diff --git a/lib/libcrypto/Symbols.list b/lib/libcrypto/Symbols.list index 7877295ccb5..be54be2f0b3 100644 --- a/lib/libcrypto/Symbols.list +++ b/lib/libcrypto/Symbols.list @@ -233,11 +233,7 @@ BIO_ctrl_wpending BIO_debug_callback BIO_dgram_non_fatal_error BIO_dump -BIO_dump_cb -BIO_dump_fp BIO_dump_indent -BIO_dump_indent_cb -BIO_dump_indent_fp BIO_dup_chain BIO_f_base64 BIO_f_buffer diff --git a/lib/libcrypto/Symbols.namespace b/lib/libcrypto/Symbols.namespace index 04ea27935c9..430c11636ef 100644 --- a/lib/libcrypto/Symbols.namespace +++ b/lib/libcrypto/Symbols.namespace @@ -1195,8 +1195,6 @@ _libre_BIO_fd_should_retry _libre_BIO_fd_non_fatal_error _libre_BIO_dump _libre_BIO_dump_indent -_libre_BIO_dump_fp -_libre_BIO_dump_indent_fp _libre_BIO_gethostbyname _libre_BIO_sock_error _libre_BIO_socket_ioctl diff --git a/lib/libcrypto/bio/b_dump.c b/lib/libcrypto/bio/b_dump.c index 39cd94e7676..4dcf710bbe2 100644 --- a/lib/libcrypto/bio/b_dump.c +++ b/lib/libcrypto/bio/b_dump.c @@ -1,4 +1,4 @@ -/* $OpenBSD: b_dump.c,v 1.29 2024/02/15 10:34:30 tb Exp $ */ +/* $OpenBSD: b_dump.c,v 1.30 2024/03/02 09:21:24 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -209,39 +209,3 @@ BIO_dump(BIO *bio, const char *s, int len) return BIO_dump_indent(bio, s, len, 0); } LCRYPTO_ALIAS(BIO_dump); - -/* - * XXX - remove the functions below in the next major bump. - */ - -int -BIO_dump_cb(int (*cb)(const void *data, size_t len, void *u), - void *u, const char *s, int len) -{ - BIOerror(ERR_R_DISABLED); - return -1; -} - -int -BIO_dump_indent_cb(int (*cb)(const void *data, size_t len, void *u), - void *u, const char *s, int len, int indent) -{ - BIOerror(ERR_R_DISABLED); - return -1; -} - -int -BIO_dump_fp(FILE *fp, const char *s, int len) -{ - BIOerror(ERR_R_DISABLED); - return -1; -} -LCRYPTO_ALIAS(BIO_dump_fp); - -int -BIO_dump_indent_fp(FILE *fp, const char *s, int len, int indent) -{ - BIOerror(ERR_R_DISABLED); - return -1; -} -LCRYPTO_ALIAS(BIO_dump_indent_fp); diff --git a/lib/libcrypto/bio/bio.h b/lib/libcrypto/bio/bio.h index 10b0924f73e..bf1be3650c8 100644 --- a/lib/libcrypto/bio/bio.h +++ b/lib/libcrypto/bio/bio.h @@ -1,4 +1,4 @@ -/* $OpenBSD: bio.h,v 1.61 2024/03/02 09:18:28 tb Exp $ */ +/* $OpenBSD: bio.h,v 1.62 2024/03/02 09:21:24 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -599,14 +599,10 @@ int BIO_dgram_non_fatal_error(int _error); int BIO_fd_should_retry(int i); int BIO_fd_non_fatal_error(int _error); -int BIO_dump_cb(int (*cb)(const void *data, size_t len, void *u), - void *u, const char *s, int len); -int BIO_dump_indent_cb(int (*cb)(const void *data, size_t len, void *u), - void *u, const char *s, int len, int indent); + int BIO_dump(BIO *b, const char *bytes, int len); int BIO_dump_indent(BIO *b, const char *bytes, int len, int indent); -int BIO_dump_fp(FILE *fp, const char *s, int len); -int BIO_dump_indent_fp(FILE *fp, const char *s, int len, int indent); + struct hostent *BIO_gethostbyname(const char *name); /* We might want a thread-safe interface too: * struct hostent *BIO_gethostbyname_r(const char *name, diff --git a/lib/libcrypto/hidden/openssl/bio.h b/lib/libcrypto/hidden/openssl/bio.h index 61664713065..4d7577a2fe9 100644 --- a/lib/libcrypto/hidden/openssl/bio.h +++ b/lib/libcrypto/hidden/openssl/bio.h @@ -1,4 +1,4 @@ -/* $OpenBSD: bio.h,v 1.5 2024/03/02 09:18:28 tb Exp $ */ +/* $OpenBSD: bio.h,v 1.6 2024/03/02 09:21:24 tb Exp $ */ /* * Copyright (c) 2023 Bob Beck * @@ -118,8 +118,6 @@ LCRYPTO_USED(BIO_fd_should_retry); LCRYPTO_USED(BIO_fd_non_fatal_error); LCRYPTO_USED(BIO_dump); LCRYPTO_USED(BIO_dump_indent); -LCRYPTO_USED(BIO_dump_fp); -LCRYPTO_USED(BIO_dump_indent_fp); LCRYPTO_USED(BIO_gethostbyname); LCRYPTO_USED(BIO_sock_error); LCRYPTO_USED(BIO_socket_ioctl); -- 2.20.1