summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortb <>2024-01-13 11:57:51 +0000
committertb <>2024-01-13 11:57:51 +0000
commit9819c77d3658919dfcbece3402fd2093c72c81bb (patch)
treebb51ef8fa337f0ca36160bc866d9763169bc87fd /src
parent3e40db59bc417c351940e6542d8cc88dffa655a6 (diff)
downloadopenbsd-9819c77d3658919dfcbece3402fd2093c72c81bb.tar.gz
openbsd-9819c77d3658919dfcbece3402fd2093c72c81bb.tar.bz2
openbsd-9819c77d3658919dfcbece3402fd2093c72c81bb.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/lib/libcrypto/evp/names.c8
-rw-r--r--src/lib/libcrypto/objects/obj_dat.c13
2 files changed, 2 insertions, 19 deletions
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 @@
1/* $OpenBSD: names.c,v 1.28 2024/01/13 11:55:31 tb Exp $ */ 1/* $OpenBSD: names.c,v 1.29 2024/01/13 11:57:51 tb Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -64,8 +64,6 @@
64 64
65#include "evp_local.h" 65#include "evp_local.h"
66 66
67extern int obj_cleanup_defer;
68
69int 67int
70EVP_add_cipher(const EVP_CIPHER *c) 68EVP_add_cipher(const EVP_CIPHER *c)
71{ 69{
@@ -81,8 +79,4 @@ EVP_add_digest(const EVP_MD *md)
81void 79void
82EVP_cleanup(void) 80EVP_cleanup(void)
83{ 81{
84 if (obj_cleanup_defer == 2) {
85 obj_cleanup_defer = 0;
86 OBJ_cleanup();
87 }
88} 82}
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 @@
1/* $OpenBSD: obj_dat.c,v 1.83 2024/01/13 11:55:31 tb Exp $ */ 1/* $OpenBSD: obj_dat.c,v 1.84 2024/01/13 11:57:51 tb Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -183,20 +183,9 @@ static IMPLEMENT_LHASH_DOALL_FN(cleanup1, ADDED_OBJ)
183static IMPLEMENT_LHASH_DOALL_FN(cleanup2, ADDED_OBJ) 183static IMPLEMENT_LHASH_DOALL_FN(cleanup2, ADDED_OBJ)
184static IMPLEMENT_LHASH_DOALL_FN(cleanup3, ADDED_OBJ) 184static IMPLEMENT_LHASH_DOALL_FN(cleanup3, ADDED_OBJ)
185 185
186/* The purpose of obj_cleanup_defer is to avoid EVP_cleanup() attempting
187 * to use freed up OIDs. If necessary the actual freeing up of OIDs is
188 * delayed.
189 */
190
191int obj_cleanup_defer = 0;
192
193void 186void
194OBJ_cleanup(void) 187OBJ_cleanup(void)
195{ 188{
196 if (obj_cleanup_defer) {
197 obj_cleanup_defer = 2;
198 return;
199 }
200 if (added == NULL) 189 if (added == NULL)
201 return; 190 return;
202 lh_ADDED_OBJ_down_load(added) = 0; 191 lh_ADDED_OBJ_down_load(added) = 0;