From 721a0919125aaef71da76adcbdb7905843d039ab Mon Sep 17 00:00:00 2001 From: tb <> Date: Sat, 2 Mar 2024 09:47:16 +0000 Subject: Remove OBJ_bsearch_() The only reason this has still been part of the public API was that libssl used it for cipher lookup. This was fixed by replacing the lookup by proper bsearch() -- why OpenSSL felt the need to reinvent ANSI C API badly will forever remain a mystery. The stack code in libcrypto still uses a version of this. This should be rewritten. It will be a bit easier once sk_find_ex() is removed. ok jsing --- src/lib/libcrypto/stack/stack.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/lib/libcrypto/stack/stack.c') diff --git a/src/lib/libcrypto/stack/stack.c b/src/lib/libcrypto/stack/stack.c index 818e738447..86117f07a7 100644 --- a/src/lib/libcrypto/stack/stack.c +++ b/src/lib/libcrypto/stack/stack.c @@ -1,4 +1,4 @@ -/* $OpenBSD: stack.c,v 1.25 2024/02/26 15:00:30 tb Exp $ */ +/* $OpenBSD: stack.c,v 1.26 2024/03/02 09:47:16 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -66,6 +66,9 @@ #undef MIN_NODES #define MIN_NODES 4 +#define OBJ_BSEARCH_VALUE_ON_NOMATCH 0x01 +#define OBJ_BSEARCH_FIRST_VALUE_ON_MATCH 0x02 + int (*sk_set_cmp_func(_STACK *sk, int (*c)(const void *, const void *)))( const void *, const void *) -- cgit v1.2.3-55-g6feb