From e68ca11e376f4237fb9f8c10487e2d7b7dbfe585 Mon Sep 17 00:00:00 2001 From: tb <> Date: Fri, 28 Jul 2023 10:21:01 +0000 Subject: Remove ERR_{get,set}_implementation() Much like ex_data, applications can make the library use their own error stack implementation. Well, except as of right now they no longer can. ok jsing --- src/lib/libcrypto/err/err.c | 31 +++---------------------------- 1 file changed, 3 insertions(+), 28 deletions(-) (limited to 'src/lib/libcrypto/err/err.c') diff --git a/src/lib/libcrypto/err/err.c b/src/lib/libcrypto/err/err.c index 8fbeea715e..8beb29543a 100644 --- a/src/lib/libcrypto/err/err.c +++ b/src/lib/libcrypto/err/err.c @@ -1,4 +1,4 @@ -/* $OpenBSD: err.c,v 1.54 2023/07/07 19:37:53 beck Exp $ */ +/* $OpenBSD: err.c,v 1.55 2023/07/28 10:21:01 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -125,6 +125,8 @@ DECLARE_LHASH_OF(ERR_STRING_DATA); DECLARE_LHASH_OF(ERR_STATE); +typedef struct st_ERR_FNS ERR_FNS; + static void err_load_strings(int lib, ERR_STRING_DATA *str); static void ERR_STATE_free(ERR_STATE *s); @@ -300,33 +302,6 @@ err_fns_check(void) CRYPTO_w_unlock(CRYPTO_LOCK_ERR); } -/* API functions to get or set the underlying ERR functions. */ - -const ERR_FNS * -ERR_get_implementation(void) -{ - err_fns_check(); - return err_fns; -} -LCRYPTO_ALIAS(ERR_get_implementation); - -int -ERR_set_implementation(const ERR_FNS *fns) -{ - int ret = 0; - - CRYPTO_w_lock(CRYPTO_LOCK_ERR); - /* It's too late if 'err_fns' is non-NULL. BTW: not much point setting - * an error is there?! */ - if (!err_fns) { - err_fns = fns; - ret = 1; - } - CRYPTO_w_unlock(CRYPTO_LOCK_ERR); - return ret; -} -LCRYPTO_ALIAS(ERR_set_implementation); - /* These are the callbacks provided to "lh_new()" when creating the LHASH tables * internal to the "err_defaults" implementation. */ -- cgit v1.2.3-55-g6feb