summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/stack
diff options
context:
space:
mode:
authortb <>2024-03-02 09:47:16 +0000
committertb <>2024-03-02 09:47:16 +0000
commit721a0919125aaef71da76adcbdb7905843d039ab (patch)
treece2dec82c7515bd7d45b198100f4e3ec4290b89b /src/lib/libcrypto/stack
parent14903cc3bcc1a541d0da5e166360fc3f53162f87 (diff)
downloadopenbsd-721a0919125aaef71da76adcbdb7905843d039ab.tar.gz
openbsd-721a0919125aaef71da76adcbdb7905843d039ab.tar.bz2
openbsd-721a0919125aaef71da76adcbdb7905843d039ab.zip
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
Diffstat (limited to 'src/lib/libcrypto/stack')
-rw-r--r--src/lib/libcrypto/stack/stack.c5
1 files changed, 4 insertions, 1 deletions
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 @@
1/* $OpenBSD: stack.c,v 1.25 2024/02/26 15:00:30 tb Exp $ */ 1/* $OpenBSD: stack.c,v 1.26 2024/03/02 09:47:16 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 *
@@ -66,6 +66,9 @@
66#undef MIN_NODES 66#undef MIN_NODES
67#define MIN_NODES 4 67#define MIN_NODES 4
68 68
69#define OBJ_BSEARCH_VALUE_ON_NOMATCH 0x01
70#define OBJ_BSEARCH_FIRST_VALUE_ON_MATCH 0x02
71
69int 72int
70(*sk_set_cmp_func(_STACK *sk, int (*c)(const void *, const void *)))( 73(*sk_set_cmp_func(_STACK *sk, int (*c)(const void *, const void *)))(
71 const void *, const void *) 74 const void *, const void *)