From 9819c77d3658919dfcbece3402fd2093c72c81bb Mon Sep 17 00:00:00 2001 From: tb <> Date: Sat, 13 Jan 2024 11:57:51 +0000 Subject: Remove obj_cleanup_defer With check_defer() gone, this is never set to anything but 0, so the two conditional branches it is still involved in are dead code. --- src/lib/libcrypto/evp/names.c | 8 +------- src/lib/libcrypto/objects/obj_dat.c | 13 +------------ 2 files changed, 2 insertions(+), 19 deletions(-) (limited to 'src') diff --git a/src/lib/libcrypto/evp/names.c b/src/lib/libcrypto/evp/names.c index 7dc9457c3e..a0b19917e1 100644 --- a/src/lib/libcrypto/evp/names.c +++ b/src/lib/libcrypto/evp/names.c @@ -1,4 +1,4 @@ -/* $OpenBSD: names.c,v 1.28 2024/01/13 11:55:31 tb Exp $ */ +/* $OpenBSD: names.c,v 1.29 2024/01/13 11:57:51 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -64,8 +64,6 @@ #include "evp_local.h" -extern int obj_cleanup_defer; - int EVP_add_cipher(const EVP_CIPHER *c) { @@ -81,8 +79,4 @@ EVP_add_digest(const EVP_MD *md) void EVP_cleanup(void) { - if (obj_cleanup_defer == 2) { - obj_cleanup_defer = 0; - OBJ_cleanup(); - } } diff --git a/src/lib/libcrypto/objects/obj_dat.c b/src/lib/libcrypto/objects/obj_dat.c index be80420702..acc4556d5b 100644 --- a/src/lib/libcrypto/objects/obj_dat.c +++ b/src/lib/libcrypto/objects/obj_dat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: obj_dat.c,v 1.83 2024/01/13 11:55:31 tb Exp $ */ +/* $OpenBSD: obj_dat.c,v 1.84 2024/01/13 11:57:51 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -183,20 +183,9 @@ static IMPLEMENT_LHASH_DOALL_FN(cleanup1, ADDED_OBJ) static IMPLEMENT_LHASH_DOALL_FN(cleanup2, ADDED_OBJ) static IMPLEMENT_LHASH_DOALL_FN(cleanup3, ADDED_OBJ) -/* The purpose of obj_cleanup_defer is to avoid EVP_cleanup() attempting - * to use freed up OIDs. If necessary the actual freeing up of OIDs is - * delayed. - */ - -int obj_cleanup_defer = 0; - void OBJ_cleanup(void) { - if (obj_cleanup_defer) { - obj_cleanup_defer = 2; - return; - } if (added == NULL) return; lh_ADDED_OBJ_down_load(added) = 0; -- cgit v1.2.3-55-g6feb