summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTheo Buehler <tb@cvs.openbsd.org>2024-01-13 11:55:32 +0000
committerTheo Buehler <tb@cvs.openbsd.org>2024-01-13 11:55:32 +0000
commit991af3c922c378164da9a15e1e7acf714d9c366e (patch)
treee3e10ac42b91ed14624ea99fa1ad40f4cd8fafc0 /lib
parente3f6bea371b15b4735ec49cd9e8b42b426576507 (diff)
Garbage collect check_defer()
This was a mechanism to ensure that OBJ_cleanup() doesn't remove the ASN1_OBJECT associated with a custom cipher or digest (that was added with EVP_add_{cipher,digest}(), while the latter is still referenced in the OBJ_NAME table. It had the effect that OBJ_cleanup() wasn't actually called ever from OPENSSL_cleanup() (it is only called if you load the OID conf module). Oh, and of course it was once part of the public API. I fixed that two years ago, almost exactly to the day. Still mentioned in OBJ_create.3.
Diffstat (limited to 'lib')
-rw-r--r--lib/libcrypto/evp/names.c3
-rw-r--r--lib/libcrypto/objects/obj_dat.c9
2 files changed, 2 insertions, 10 deletions
diff --git a/lib/libcrypto/evp/names.c b/lib/libcrypto/evp/names.c
index 6ef061a2cb6..7dc9457c3e4 100644
--- a/lib/libcrypto/evp/names.c
+++ b/lib/libcrypto/evp/names.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: names.c,v 1.27 2024/01/13 11:48:16 tb Exp $ */
+/* $OpenBSD: names.c,v 1.28 2024/01/13 11:55:31 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -65,7 +65,6 @@
#include "evp_local.h"
extern int obj_cleanup_defer;
-void check_defer(int nid);
int
EVP_add_cipher(const EVP_CIPHER *c)
diff --git a/lib/libcrypto/objects/obj_dat.c b/lib/libcrypto/objects/obj_dat.c
index e72598ef616..be80420702d 100644
--- a/lib/libcrypto/objects/obj_dat.c
+++ b/lib/libcrypto/objects/obj_dat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: obj_dat.c,v 1.82 2023/12/15 01:51:23 tb Exp $ */
+/* $OpenBSD: obj_dat.c,v 1.83 2024/01/13 11:55:31 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -191,13 +191,6 @@ static IMPLEMENT_LHASH_DOALL_FN(cleanup3, ADDED_OBJ)
int obj_cleanup_defer = 0;
void
-check_defer(int nid)
-{
- if (!obj_cleanup_defer && nid >= NUM_NID)
- obj_cleanup_defer = 1;
-}
-
-void
OBJ_cleanup(void)
{
if (obj_cleanup_defer) {