summaryrefslogtreecommitdiff
path: root/lib/libssl/ssl_local.h
diff options
context:
space:
mode:
authorTheo Buehler <tb@cvs.openbsd.org>2023-11-29 13:39:35 +0000
committerTheo Buehler <tb@cvs.openbsd.org>2023-11-29 13:39:35 +0000
commitde9ec76bdf0b0c19c920e74ec4d706a432df901f (patch)
tree4cab642db4c0a20ffd6b44b99379647e6424a70c /lib/libssl/ssl_local.h
parent4717e3f91b2174fd1b83da952b0a262912f7ffeb (diff)
Convert ssl3_cipher_by_id() to bsearch()
This was previously the only user of OBJ_bsearch_ssl_cipher_id(), which in turn is the one remaining user of OBJ_bsearch_() outside of libcrypto. OBJ_bsearch_() is OpenSSL's idiosyncratic reimplementation of ANSI C89's bsearch(). Since this used to be hidden behind macro insanity, the result was three inscrutable layers of comparison functions. It is much simpler and cleaner to use the standard API. Move all the code to s3_lib.c, since it's ony used there. In a few further diffs, OBJ_bsearch_() will be removed from libcrypto. Unfortunately, we'll need to keep OBJ_bsearch_ex(), because it is exposed via sk_find_ex(), which is exposed by M2Crypto... ok jsing
Diffstat (limited to 'lib/libssl/ssl_local.h')
-rw-r--r--lib/libssl/ssl_local.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/libssl/ssl_local.h b/lib/libssl/ssl_local.h
index 3c5fb204b00..a2c2588c38b 100644
--- a/lib/libssl/ssl_local.h
+++ b/lib/libssl/ssl_local.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssl_local.h,v 1.10 2023/11/29 13:29:34 tb Exp $ */
+/* $OpenBSD: ssl_local.h,v 1.11 2023/11/29 13:39:34 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -1304,8 +1304,6 @@ SSL_SESSION *ssl_session_dup(SSL_SESSION *src, int include_ticket);
int ssl_get_new_session(SSL *s, int session);
int ssl_get_prev_session(SSL *s, CBS *session_id, CBS *ext_block,
int *alert);
-SSL_CIPHER *OBJ_bsearch_ssl_cipher_id(SSL_CIPHER *key, SSL_CIPHER const *base,
- int num);
int ssl_cipher_list_to_bytes(SSL *s, STACK_OF(SSL_CIPHER) *ciphers, CBB *cbb);
STACK_OF(SSL_CIPHER) *ssl_bytes_to_cipher_list(SSL *s, CBS *cbs);
STACK_OF(SSL_CIPHER) *ssl_create_cipher_list(const SSL_METHOD *meth,