summaryrefslogtreecommitdiff
path: root/src/lib/libssl/ssl_local.h
diff options
context:
space:
mode:
authortb <>2023-11-29 13:39:34 +0000
committertb <>2023-11-29 13:39:34 +0000
commit5fc61c757deaae46e25cc163ae9e92831528fbc8 (patch)
treef6fe9a9fb0e2f88a15ec1b3eb39c745c2618710c /src/lib/libssl/ssl_local.h
parent49adf1fb564c33009eb18992e86dac6577364047 (diff)
downloadopenbsd-5fc61c757deaae46e25cc163ae9e92831528fbc8.tar.gz
openbsd-5fc61c757deaae46e25cc163ae9e92831528fbc8.tar.bz2
openbsd-5fc61c757deaae46e25cc163ae9e92831528fbc8.zip
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 '')
-rw-r--r--src/lib/libssl/ssl_local.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/lib/libssl/ssl_local.h b/src/lib/libssl/ssl_local.h
index 3c5fb204b0..a2c2588c38 100644
--- a/src/lib/libssl/ssl_local.h
+++ b/src/lib/libssl/ssl_local.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssl_local.h,v 1.10 2023/11/29 13:29:34 tb Exp $ */ 1/* $OpenBSD: ssl_local.h,v 1.11 2023/11/29 13:39:34 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 *
@@ -1304,8 +1304,6 @@ SSL_SESSION *ssl_session_dup(SSL_SESSION *src, int include_ticket);
1304int ssl_get_new_session(SSL *s, int session); 1304int ssl_get_new_session(SSL *s, int session);
1305int ssl_get_prev_session(SSL *s, CBS *session_id, CBS *ext_block, 1305int ssl_get_prev_session(SSL *s, CBS *session_id, CBS *ext_block,
1306 int *alert); 1306 int *alert);
1307SSL_CIPHER *OBJ_bsearch_ssl_cipher_id(SSL_CIPHER *key, SSL_CIPHER const *base,
1308 int num);
1309int ssl_cipher_list_to_bytes(SSL *s, STACK_OF(SSL_CIPHER) *ciphers, CBB *cbb); 1307int ssl_cipher_list_to_bytes(SSL *s, STACK_OF(SSL_CIPHER) *ciphers, CBB *cbb);
1310STACK_OF(SSL_CIPHER) *ssl_bytes_to_cipher_list(SSL *s, CBS *cbs); 1308STACK_OF(SSL_CIPHER) *ssl_bytes_to_cipher_list(SSL *s, CBS *cbs);
1311STACK_OF(SSL_CIPHER) *ssl_create_cipher_list(const SSL_METHOD *meth, 1309STACK_OF(SSL_CIPHER) *ssl_create_cipher_list(const SSL_METHOD *meth,