From bb36e56d13dab2c4b76e52954aa24b58941ef662 Mon Sep 17 00:00:00 2001 From: tb Date: Sat, 2 Mar 2024 09:22:41 +0000 Subject: [PATCH] Remove BIO_set() This used to be a dangerous implementation detail of BIO_new() that was never used outside of libcrypto. ok jsing --- lib/libcrypto/Symbols.list | 1 - lib/libcrypto/Symbols.namespace | 1 - lib/libcrypto/bio/bio.h | 3 +-- lib/libcrypto/bio/bio_lib.c | 10 +--------- lib/libcrypto/hidden/openssl/bio.h | 3 +-- 5 files changed, 3 insertions(+), 15 deletions(-) diff --git a/lib/libcrypto/Symbols.list b/lib/libcrypto/Symbols.list index be54be2f0b3..19f88c6917e 100644 --- a/lib/libcrypto/Symbols.list +++ b/lib/libcrypto/Symbols.list @@ -315,7 +315,6 @@ BIO_s_log BIO_s_mem BIO_s_null BIO_s_socket -BIO_set BIO_set_callback BIO_set_callback_arg BIO_set_callback_ex diff --git a/lib/libcrypto/Symbols.namespace b/lib/libcrypto/Symbols.namespace index 430c11636ef..e97629108a1 100644 --- a/lib/libcrypto/Symbols.namespace +++ b/lib/libcrypto/Symbols.namespace @@ -1145,7 +1145,6 @@ _libre_BIO_s_file _libre_BIO_new_file _libre_BIO_new_fp _libre_BIO_new -_libre_BIO_set _libre_BIO_free _libre_BIO_up_ref _libre_BIO_get_data diff --git a/lib/libcrypto/bio/bio.h b/lib/libcrypto/bio/bio.h index bf1be3650c8..a50fb163425 100644 --- a/lib/libcrypto/bio/bio.h +++ b/lib/libcrypto/bio/bio.h @@ -1,4 +1,4 @@ -/* $OpenBSD: bio.h,v 1.62 2024/03/02 09:21:24 tb Exp $ */ +/* $OpenBSD: bio.h,v 1.63 2024/03/02 09:22:41 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -534,7 +534,6 @@ const BIO_METHOD *BIO_s_file(void); BIO *BIO_new_file(const char *filename, const char *mode); BIO *BIO_new_fp(FILE *stream, int close_flag); BIO *BIO_new(const BIO_METHOD *type); -int BIO_set(BIO *a, const BIO_METHOD *type); int BIO_free(BIO *a); int BIO_up_ref(BIO *bio); void *BIO_get_data(BIO *a); diff --git a/lib/libcrypto/bio/bio_lib.c b/lib/libcrypto/bio/bio_lib.c index c90dd161f88..2f490a42f97 100644 --- a/lib/libcrypto/bio/bio_lib.c +++ b/lib/libcrypto/bio/bio_lib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bio_lib.c,v 1.51 2024/02/17 14:29:07 jsing Exp $ */ +/* $OpenBSD: bio_lib.c,v 1.52 2024/03/02 09:22:41 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -160,14 +160,6 @@ BIO_new(const BIO_METHOD *method) } LCRYPTO_ALIAS(BIO_new); -int -BIO_set(BIO *bio, const BIO_METHOD *method) -{ - BIOerror(ERR_R_DISABLED); - return 0; -} -LCRYPTO_ALIAS(BIO_set); - int BIO_free(BIO *bio) { diff --git a/lib/libcrypto/hidden/openssl/bio.h b/lib/libcrypto/hidden/openssl/bio.h index 4d7577a2fe9..425d1e29415 100644 --- a/lib/libcrypto/hidden/openssl/bio.h +++ b/lib/libcrypto/hidden/openssl/bio.h @@ -1,4 +1,4 @@ -/* $OpenBSD: bio.h,v 1.6 2024/03/02 09:21:24 tb Exp $ */ +/* $OpenBSD: bio.h,v 1.7 2024/03/02 09:22:41 tb Exp $ */ /* * Copyright (c) 2023 Bob Beck * @@ -68,7 +68,6 @@ LCRYPTO_USED(BIO_s_file); LCRYPTO_USED(BIO_new_file); LCRYPTO_USED(BIO_new_fp); LCRYPTO_USED(BIO_new); -LCRYPTO_USED(BIO_set); LCRYPTO_USED(BIO_free); LCRYPTO_USED(BIO_up_ref); LCRYPTO_USED(BIO_get_data); -- 2.20.1