From 95f31392db9847cb8ee96b82928adc99fe8c51bc Mon Sep 17 00:00:00 2001 From: tb Date: Thu, 29 Jun 2023 06:11:33 +0000 Subject: [PATCH] Move check_defer() and obj_cleanup_defer to evp/names.c These formerly public symbols are the last things hidden by LIBRESSL_CRYPTO_INTERNAL. Most of their use is in evp/names.c Unfortunately, check_defer() needs to know about NUM_NIDS, so its implementation needs to remain in obj_dat.c, the only file that can include obj_dat.h due to NID tables. ok miod --- lib/libcrypto/evp/names.c | 5 ++++- lib/libcrypto/objects/objects.h | 7 +------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/lib/libcrypto/evp/names.c b/lib/libcrypto/evp/names.c index a27a187542f..10ce13bb89f 100644 --- a/lib/libcrypto/evp/names.c +++ b/lib/libcrypto/evp/names.c @@ -1,4 +1,4 @@ -/* $OpenBSD: names.c,v 1.16 2022/11/26 16:08:52 tb Exp $ */ +/* $OpenBSD: names.c,v 1.17 2023/06/29 06:11:33 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -64,6 +64,9 @@ #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/objects.h b/lib/libcrypto/objects/objects.h index 7fc11fa594f..91e4eb0d1d7 100644 --- a/lib/libcrypto/objects/objects.h +++ b/lib/libcrypto/objects/objects.h @@ -1,4 +1,4 @@ -/* $OpenBSD: objects.h,v 1.21 2022/11/13 14:03:13 tb Exp $ */ +/* $OpenBSD: objects.h,v 1.22 2023/06/29 06:11:33 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -142,11 +142,6 @@ int OBJ_find_sigid_by_algs(int *psignid, int dig_nid, int pkey_nid); int OBJ_add_sigid(int signid, int dig_id, int pkey_id); void OBJ_sigid_free(void); -#if defined(LIBRESSL_CRYPTO_INTERNAL) -extern int obj_cleanup_defer; -void check_defer(int nid); -#endif - void ERR_load_OBJ_strings(void); /* Error codes for the OBJ functions. */ -- 2.20.1