summaryrefslogtreecommitdiff
path: root/src/lib/libssl/ssl_local.h
diff options
context:
space:
mode:
authorjsing <>2024-07-23 14:40:54 +0000
committerjsing <>2024-07-23 14:40:54 +0000
commit6861a5a72a0bd87259b9e40bd0a0f7c85fd11e9c (patch)
tree5d02fbe166341d303cc7117737100adbfbf744c2 /src/lib/libssl/ssl_local.h
parent9d00569d89dbe870d2bc630ceb14e42ee1807ec5 (diff)
downloadopenbsd-6861a5a72a0bd87259b9e40bd0a0f7c85fd11e9c.tar.gz
openbsd-6861a5a72a0bd87259b9e40bd0a0f7c85fd11e9c.tar.bz2
openbsd-6861a5a72a0bd87259b9e40bd0a0f7c85fd11e9c.zip
Remove get_cipher from SSL_METHOD.
Inline the get_cipher implementation (including the special handling for DTLS) in ssl_cipher_collect_ciphers() (the only consumer), remove the get_cipher member of SSL_METHOD and mop up dtls1_get_cipher(). ssl3_get_cipher() has always had a strange property of being a reverse index, which is relied on by the cipher list ordering code, since it currently assumes that high cipher suite values are preferable. Rather than complicating ssl3_get_cipher() (and regress), change the iteration order in ssl_cipher_collect_ciphers() to match what it requires. Lastly, rename ssl3_get_cipher() to be more descriptive. ok tb@
Diffstat (limited to 'src/lib/libssl/ssl_local.h')
-rw-r--r--src/lib/libssl/ssl_local.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/lib/libssl/ssl_local.h b/src/lib/libssl/ssl_local.h
index 34197e5920..4cbc13f8ac 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.22 2024/07/22 14:47:15 jsing Exp $ */ 1/* $OpenBSD: ssl_local.h,v 1.23 2024/07/23 14:40:54 jsing 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 *
@@ -379,8 +379,6 @@ struct ssl_method_st {
379 int peek); 379 int peek);
380 int (*ssl_write_bytes)(SSL *s, int type, const void *buf_, int len); 380 int (*ssl_write_bytes)(SSL *s, int type, const void *buf_, int len);
381 381
382 const SSL_CIPHER *(*get_cipher)(unsigned int ncipher);
383
384 unsigned int enc_flags; /* SSL_ENC_FLAG_* */ 382 unsigned int enc_flags; /* SSL_ENC_FLAG_* */
385}; 383};
386 384
@@ -1290,7 +1288,7 @@ int ssl3_send_alert(SSL *s, int level, int desc);
1290int ssl3_get_req_cert_types(SSL *s, CBB *cbb); 1288int ssl3_get_req_cert_types(SSL *s, CBB *cbb);
1291int ssl3_get_message(SSL *s, int st1, int stn, int mt, long max); 1289int ssl3_get_message(SSL *s, int st1, int stn, int mt, long max);
1292int ssl3_num_ciphers(void); 1290int ssl3_num_ciphers(void);
1293const SSL_CIPHER *ssl3_get_cipher(unsigned int u); 1291const SSL_CIPHER *ssl3_get_cipher_by_index(int idx);
1294const SSL_CIPHER *ssl3_get_cipher_by_value(uint16_t value); 1292const SSL_CIPHER *ssl3_get_cipher_by_value(uint16_t value);
1295int ssl3_renegotiate(SSL *ssl); 1293int ssl3_renegotiate(SSL *ssl);
1296 1294