summaryrefslogtreecommitdiff
path: root/src/lib/libssl/ssl_local.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libssl/ssl_local.h')
-rw-r--r--src/lib/libssl/ssl_local.h40
1 files changed, 16 insertions, 24 deletions
diff --git a/src/lib/libssl/ssl_local.h b/src/lib/libssl/ssl_local.h
index 6484c8dea3..67ca4a5511 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.37 2026/04/03 13:11:00 jsing Exp $ */ 1/* $OpenBSD: ssl_local.h,v 1.43 2026/08/21 17:15:22 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 *
@@ -263,10 +263,6 @@ __BEGIN_HIDDEN_DECLS
263 */ 263 */
264#define SSL_C_PKEYLENGTH(c) 1024 264#define SSL_C_PKEYLENGTH(c) 1024
265 265
266/* See if we use signature algorithms extension. */
267#define SSL_USE_SIGALGS(s) \
268 (s->method->enc_flags & SSL_ENC_FLAG_SIGALGS)
269
270/* Allow TLS 1.2 ciphersuites: applies to DTLS 1.2 as well as TLS 1.2. */ 266/* Allow TLS 1.2 ciphersuites: applies to DTLS 1.2 as well as TLS 1.2. */
271#define SSL_USE_TLS1_2_CIPHERS(s) \ 267#define SSL_USE_TLS1_2_CIPHERS(s) \
272 (s->method->enc_flags & SSL_ENC_FLAG_TLS1_2_CIPHERS) 268 (s->method->enc_flags & SSL_ENC_FLAG_TLS1_2_CIPHERS)
@@ -432,7 +428,7 @@ struct ssl_session_st {
432 428
433 char *tlsext_hostname; 429 char *tlsext_hostname;
434 430
435 /* Session resumption - RFC 5077 and RFC 8446. */ 431 /* Session resumption - RFC 5077 and RFC 9846. */
436 unsigned char *tlsext_tick; /* Session ticket */ 432 unsigned char *tlsext_tick; /* Session ticket */
437 size_t tlsext_ticklen; /* Session ticket length */ 433 size_t tlsext_ticklen; /* Session ticket length */
438 uint32_t tlsext_tick_lifetime_hint; /* Session lifetime hint in seconds */ 434 uint32_t tlsext_tick_lifetime_hint; /* Session lifetime hint in seconds */
@@ -1163,9 +1159,6 @@ typedef struct ssl3_state_st {
1163 * Flag values for enc_flags. 1159 * Flag values for enc_flags.
1164 */ 1160 */
1165 1161
1166/* Uses signature algorithms extension. */
1167#define SSL_ENC_FLAG_SIGALGS (1 << 1)
1168
1169/* Allow TLS 1.2 ciphersuites: applies to DTLS 1.2 as well as TLS 1.2. */ 1162/* Allow TLS 1.2 ciphersuites: applies to DTLS 1.2 as well as TLS 1.2. */
1170#define SSL_ENC_FLAG_TLS1_2_CIPHERS (1 << 4) 1163#define SSL_ENC_FLAG_TLS1_2_CIPHERS (1 << 4)
1171 1164
@@ -1174,10 +1167,8 @@ typedef struct ssl3_state_st {
1174 1167
1175#define TLSV1_ENC_FLAGS 0 1168#define TLSV1_ENC_FLAGS 0
1176#define TLSV1_1_ENC_FLAGS 0 1169#define TLSV1_1_ENC_FLAGS 0
1177#define TLSV1_2_ENC_FLAGS (SSL_ENC_FLAG_SIGALGS | \ 1170#define TLSV1_2_ENC_FLAGS SSL_ENC_FLAG_TLS1_2_CIPHERS
1178 SSL_ENC_FLAG_TLS1_2_CIPHERS) 1171#define TLSV1_3_ENC_FLAGS SSL_ENC_FLAG_TLS1_3_CIPHERS
1179#define TLSV1_3_ENC_FLAGS (SSL_ENC_FLAG_SIGALGS | \
1180 SSL_ENC_FLAG_TLS1_3_CIPHERS)
1181 1172
1182extern const SSL_CIPHER ssl3_ciphers[]; 1173extern const SSL_CIPHER ssl3_ciphers[];
1183 1174
@@ -1186,15 +1177,17 @@ int ssl_version_set_min(const SSL_METHOD *meth, uint16_t proto_ver,
1186 uint16_t max_tls_ver, uint16_t *out_tls_ver, uint16_t *out_proto_ver); 1177 uint16_t max_tls_ver, uint16_t *out_tls_ver, uint16_t *out_proto_ver);
1187int ssl_version_set_max(const SSL_METHOD *meth, uint16_t proto_ver, 1178int ssl_version_set_max(const SSL_METHOD *meth, uint16_t proto_ver,
1188 uint16_t min_tls_ver, uint16_t *out_tls_ver, uint16_t *out_proto_ver); 1179 uint16_t min_tls_ver, uint16_t *out_tls_ver, uint16_t *out_proto_ver);
1189int ssl_enabled_tls_version_range(SSL *s, uint16_t *min_ver, uint16_t *max_ver); 1180int ssl_enabled_tls_version_range(const SSL *s, uint16_t *min_ver,
1190int ssl_supported_tls_version_range(SSL *s, uint16_t *min_ver, uint16_t *max_ver); 1181 uint16_t *max_ver);
1182int ssl_supported_tls_version_range(const SSL *s, uint16_t *min_ver,
1183 uint16_t *max_ver);
1191uint16_t ssl_tls_version(uint16_t version); 1184uint16_t ssl_tls_version(uint16_t version);
1192uint16_t ssl_effective_tls_version(SSL *s); 1185uint16_t ssl_effective_tls_version(const SSL *s);
1193int ssl_max_supported_version(SSL *s, uint16_t *max_ver); 1186int ssl_max_supported_version(const SSL *s, uint16_t *max_ver);
1194int ssl_max_legacy_version(SSL *s, uint16_t *max_ver); 1187int ssl_max_legacy_version(const SSL *s, uint16_t *max_ver);
1195int ssl_max_shared_version(SSL *s, uint16_t peer_ver, uint16_t *max_ver); 1188int ssl_max_shared_version(const SSL *s, uint16_t peer_ver, uint16_t *max_ver);
1196int ssl_check_version_from_server(SSL *s, uint16_t server_version); 1189int ssl_check_version_from_server(const SSL *s, uint16_t server_version);
1197int ssl_legacy_stack_version(SSL *s, uint16_t version); 1190int ssl_legacy_stack_version(const SSL *s, uint16_t version);
1198int ssl_cipher_in_list(STACK_OF(SSL_CIPHER) *ciphers, const SSL_CIPHER *cipher); 1191int ssl_cipher_in_list(STACK_OF(SSL_CIPHER) *ciphers, const SSL_CIPHER *cipher);
1199int ssl_cipher_allowed_in_tls_version_range(const SSL_CIPHER *cipher, 1192int ssl_cipher_allowed_in_tls_version_range(const SSL_CIPHER *cipher,
1200 uint16_t min_ver, uint16_t max_ver); 1193 uint16_t min_ver, uint16_t max_ver);
@@ -1316,7 +1309,6 @@ long ssl3_callback_ctrl(SSL *s, int cmd, void (*fp)(void));
1316long ssl3_ctx_callback_ctrl(SSL_CTX *s, int cmd, void (*fp)(void)); 1309long ssl3_ctx_callback_ctrl(SSL_CTX *s, int cmd, void (*fp)(void));
1317int ssl3_pending(const SSL *s); 1310int ssl3_pending(const SSL *s);
1318 1311
1319int ssl3_handshake_msg_hdr_len(SSL *s);
1320int ssl3_handshake_msg_start(SSL *s, CBB *handshake, CBB *body, 1312int ssl3_handshake_msg_start(SSL *s, CBB *handshake, CBB *body,
1321 uint8_t msg_type); 1313 uint8_t msg_type);
1322int ssl3_handshake_msg_finish(SSL *s, CBB *handshake); 1314int ssl3_handshake_msg_finish(SSL *s, CBB *handshake);
@@ -1327,7 +1319,6 @@ int ssl3_do_change_cipher_spec(SSL *ssl);
1327 1319
1328int ssl3_packet_read(SSL *s, int plen); 1320int ssl3_packet_read(SSL *s, int plen);
1329int ssl3_packet_extend(SSL *s, int plen); 1321int ssl3_packet_extend(SSL *s, int plen);
1330int ssl_server_legacy_first_packet(SSL *s);
1331int ssl3_write_pending(SSL *s, int type, const unsigned char *buf, 1322int ssl3_write_pending(SSL *s, int type, const unsigned char *buf,
1332 unsigned int len); 1323 unsigned int len);
1333 1324
@@ -1345,7 +1336,8 @@ int ssl_kex_derive_dhe(DH *dh, DH *dh_peer,
1345int ssl_kex_dummy_ecdhe_x25519(EVP_PKEY *pkey); 1336int ssl_kex_dummy_ecdhe_x25519(EVP_PKEY *pkey);
1346int ssl_kex_generate_ecdhe_ecp(EC_KEY *ecdh, int nid); 1337int ssl_kex_generate_ecdhe_ecp(EC_KEY *ecdh, int nid);
1347int ssl_kex_public_ecdhe_ecp(EC_KEY *ecdh, CBB *cbb); 1338int ssl_kex_public_ecdhe_ecp(EC_KEY *ecdh, CBB *cbb);
1348int ssl_kex_peer_public_ecdhe_ecp(EC_KEY *ecdh, int nid, CBS *cbs); 1339int ssl_kex_peer_public_ecdhe_ecp(EC_KEY *ecdh, int nid, CBS *cbs,
1340 int *decode_error);
1349int ssl_kex_derive_ecdhe_ecp(EC_KEY *ecdh, EC_KEY *ecdh_peer, 1341int ssl_kex_derive_ecdhe_ecp(EC_KEY *ecdh, EC_KEY *ecdh_peer,
1350 uint8_t **shared_key, size_t *shared_key_len); 1342 uint8_t **shared_key, size_t *shared_key_len);
1351 1343