diff options
| author | jsing <> | 2024-07-23 14:40:54 +0000 |
|---|---|---|
| committer | jsing <> | 2024-07-23 14:40:54 +0000 |
| commit | db84a0d6a236726c87d7c4ee86e95e65452b429e (patch) | |
| tree | 5d02fbe166341d303cc7117737100adbfbf744c2 /src/lib/libssl/ssl_local.h | |
| parent | ee47b67deae4b8751972f7fc4a0b821ffc61bb86 (diff) | |
| download | openbsd-db84a0d6a236726c87d7c4ee86e95e65452b429e.tar.gz openbsd-db84a0d6a236726c87d7c4ee86e95e65452b429e.tar.bz2 openbsd-db84a0d6a236726c87d7c4ee86e95e65452b429e.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.h | 6 |
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); | |||
| 1290 | int ssl3_get_req_cert_types(SSL *s, CBB *cbb); | 1288 | int ssl3_get_req_cert_types(SSL *s, CBB *cbb); |
| 1291 | int ssl3_get_message(SSL *s, int st1, int stn, int mt, long max); | 1289 | int ssl3_get_message(SSL *s, int st1, int stn, int mt, long max); |
| 1292 | int ssl3_num_ciphers(void); | 1290 | int ssl3_num_ciphers(void); |
| 1293 | const SSL_CIPHER *ssl3_get_cipher(unsigned int u); | 1291 | const SSL_CIPHER *ssl3_get_cipher_by_index(int idx); |
| 1294 | const SSL_CIPHER *ssl3_get_cipher_by_value(uint16_t value); | 1292 | const SSL_CIPHER *ssl3_get_cipher_by_value(uint16_t value); |
| 1295 | int ssl3_renegotiate(SSL *ssl); | 1293 | int ssl3_renegotiate(SSL *ssl); |
| 1296 | 1294 | ||
