diff options
author | tb <> | 2024-01-13 11:57:51 +0000 |
---|---|---|
committer | tb <> | 2024-01-13 11:57:51 +0000 |
commit | 9819c77d3658919dfcbece3402fd2093c72c81bb (patch) | |
tree | bb51ef8fa337f0ca36160bc866d9763169bc87fd /src | |
parent | 3e40db59bc417c351940e6542d8cc88dffa655a6 (diff) | |
download | openbsd-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.c | 8 | ||||
-rw-r--r-- | src/lib/libcrypto/objects/obj_dat.c | 13 |
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 | ||
67 | extern int obj_cleanup_defer; | ||
68 | |||
69 | int | 67 | int |
70 | EVP_add_cipher(const EVP_CIPHER *c) | 68 | EVP_add_cipher(const EVP_CIPHER *c) |
71 | { | 69 | { |
@@ -81,8 +79,4 @@ EVP_add_digest(const EVP_MD *md) | |||
81 | void | 79 | void |
82 | EVP_cleanup(void) | 80 | EVP_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) | |||
183 | static IMPLEMENT_LHASH_DOALL_FN(cleanup2, ADDED_OBJ) | 183 | static IMPLEMENT_LHASH_DOALL_FN(cleanup2, ADDED_OBJ) |
184 | static IMPLEMENT_LHASH_DOALL_FN(cleanup3, ADDED_OBJ) | 184 | static 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 | |||
191 | int obj_cleanup_defer = 0; | ||
192 | |||
193 | void | 186 | void |
194 | OBJ_cleanup(void) | 187 | OBJ_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; |