diff options
Diffstat (limited to 'src/lib/libssl/ssl_local.h')
| -rw-r--r-- | src/lib/libssl/ssl_local.h | 40 |
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 | ||
| 1182 | extern const SSL_CIPHER ssl3_ciphers[]; | 1173 | extern 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); |
| 1187 | int ssl_version_set_max(const SSL_METHOD *meth, uint16_t proto_ver, | 1178 | int 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); |
| 1189 | int ssl_enabled_tls_version_range(SSL *s, uint16_t *min_ver, uint16_t *max_ver); | 1180 | int ssl_enabled_tls_version_range(const SSL *s, uint16_t *min_ver, |
| 1190 | int ssl_supported_tls_version_range(SSL *s, uint16_t *min_ver, uint16_t *max_ver); | 1181 | uint16_t *max_ver); |
| 1182 | int ssl_supported_tls_version_range(const SSL *s, uint16_t *min_ver, | ||
| 1183 | uint16_t *max_ver); | ||
| 1191 | uint16_t ssl_tls_version(uint16_t version); | 1184 | uint16_t ssl_tls_version(uint16_t version); |
| 1192 | uint16_t ssl_effective_tls_version(SSL *s); | 1185 | uint16_t ssl_effective_tls_version(const SSL *s); |
| 1193 | int ssl_max_supported_version(SSL *s, uint16_t *max_ver); | 1186 | int ssl_max_supported_version(const SSL *s, uint16_t *max_ver); |
| 1194 | int ssl_max_legacy_version(SSL *s, uint16_t *max_ver); | 1187 | int ssl_max_legacy_version(const SSL *s, uint16_t *max_ver); |
| 1195 | int ssl_max_shared_version(SSL *s, uint16_t peer_ver, uint16_t *max_ver); | 1188 | int ssl_max_shared_version(const SSL *s, uint16_t peer_ver, uint16_t *max_ver); |
| 1196 | int ssl_check_version_from_server(SSL *s, uint16_t server_version); | 1189 | int ssl_check_version_from_server(const SSL *s, uint16_t server_version); |
| 1197 | int ssl_legacy_stack_version(SSL *s, uint16_t version); | 1190 | int ssl_legacy_stack_version(const SSL *s, uint16_t version); |
| 1198 | int ssl_cipher_in_list(STACK_OF(SSL_CIPHER) *ciphers, const SSL_CIPHER *cipher); | 1191 | int ssl_cipher_in_list(STACK_OF(SSL_CIPHER) *ciphers, const SSL_CIPHER *cipher); |
| 1199 | int ssl_cipher_allowed_in_tls_version_range(const SSL_CIPHER *cipher, | 1192 | int 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)); | |||
| 1316 | long ssl3_ctx_callback_ctrl(SSL_CTX *s, int cmd, void (*fp)(void)); | 1309 | long ssl3_ctx_callback_ctrl(SSL_CTX *s, int cmd, void (*fp)(void)); |
| 1317 | int ssl3_pending(const SSL *s); | 1310 | int ssl3_pending(const SSL *s); |
| 1318 | 1311 | ||
| 1319 | int ssl3_handshake_msg_hdr_len(SSL *s); | ||
| 1320 | int ssl3_handshake_msg_start(SSL *s, CBB *handshake, CBB *body, | 1312 | int ssl3_handshake_msg_start(SSL *s, CBB *handshake, CBB *body, |
| 1321 | uint8_t msg_type); | 1313 | uint8_t msg_type); |
| 1322 | int ssl3_handshake_msg_finish(SSL *s, CBB *handshake); | 1314 | int ssl3_handshake_msg_finish(SSL *s, CBB *handshake); |
| @@ -1327,7 +1319,6 @@ int ssl3_do_change_cipher_spec(SSL *ssl); | |||
| 1327 | 1319 | ||
| 1328 | int ssl3_packet_read(SSL *s, int plen); | 1320 | int ssl3_packet_read(SSL *s, int plen); |
| 1329 | int ssl3_packet_extend(SSL *s, int plen); | 1321 | int ssl3_packet_extend(SSL *s, int plen); |
| 1330 | int ssl_server_legacy_first_packet(SSL *s); | ||
| 1331 | int ssl3_write_pending(SSL *s, int type, const unsigned char *buf, | 1322 | int 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, | |||
| 1345 | int ssl_kex_dummy_ecdhe_x25519(EVP_PKEY *pkey); | 1336 | int ssl_kex_dummy_ecdhe_x25519(EVP_PKEY *pkey); |
| 1346 | int ssl_kex_generate_ecdhe_ecp(EC_KEY *ecdh, int nid); | 1337 | int ssl_kex_generate_ecdhe_ecp(EC_KEY *ecdh, int nid); |
| 1347 | int ssl_kex_public_ecdhe_ecp(EC_KEY *ecdh, CBB *cbb); | 1338 | int ssl_kex_public_ecdhe_ecp(EC_KEY *ecdh, CBB *cbb); |
| 1348 | int ssl_kex_peer_public_ecdhe_ecp(EC_KEY *ecdh, int nid, CBS *cbs); | 1339 | int ssl_kex_peer_public_ecdhe_ecp(EC_KEY *ecdh, int nid, CBS *cbs, |
| 1340 | int *decode_error); | ||
| 1349 | int ssl_kex_derive_ecdhe_ecp(EC_KEY *ecdh, EC_KEY *ecdh_peer, | 1341 | int 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 | ||
