summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjsing <>2026-06-06 15:08:15 +0000
committerjsing <>2026-06-06 15:08:15 +0000
commit8191edd9cf4fcae6a4e5e054326fdf2e620b353b (patch)
tree5c40424bc127afacfb6f004c98557589f15fa42f /src
parent93c5a7dd0add95919ba07556309ed8db9d396005 (diff)
downloadopenbsd-8191edd9cf4fcae6a4e5e054326fdf2e620b353b.tar.gz
openbsd-8191edd9cf4fcae6a4e5e054326fdf2e620b353b.tar.bz2
openbsd-8191edd9cf4fcae6a4e5e054326fdf2e620b353b.zip
Remove ssl3_handshake_msg_hdr_len()
This function is only called in one location, which is always a DTLS context - use DTLS1_HM_HEADER_LENGTH directly instead. ok kenjiro@ tb@
Diffstat (limited to 'src')
-rw-r--r--src/lib/libssl/s3_lib.c11
-rw-r--r--src/lib/libssl/ssl_local.h3
2 files changed, 3 insertions, 11 deletions
diff --git a/src/lib/libssl/s3_lib.c b/src/lib/libssl/s3_lib.c
index bcf26bec40..ee9a695ecd 100644
--- a/src/lib/libssl/s3_lib.c
+++ b/src/lib/libssl/s3_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: s3_lib.c,v 1.258 2025/12/04 21:16:17 beck Exp $ */ 1/* $OpenBSD: s3_lib.c,v 1.259 2026/06/06 15:08:15 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 *
@@ -1163,13 +1163,6 @@ ssl3_pending(const SSL *s)
1163} 1163}
1164 1164
1165int 1165int
1166ssl3_handshake_msg_hdr_len(SSL *s)
1167{
1168 return (SSL_is_dtls(s) ? DTLS1_HM_HEADER_LENGTH :
1169 SSL3_HM_HEADER_LENGTH);
1170}
1171
1172int
1173ssl3_handshake_msg_start(SSL *s, CBB *handshake, CBB *body, uint8_t msg_type) 1166ssl3_handshake_msg_start(SSL *s, CBB *handshake, CBB *body, uint8_t msg_type)
1174{ 1167{
1175 int ret = 0; 1168 int ret = 0;
@@ -1224,7 +1217,7 @@ ssl3_handshake_msg_finish(SSL *s, CBB *handshake)
1224 if (!CBS_get_u8(&cbs, &msg_type)) 1217 if (!CBS_get_u8(&cbs, &msg_type))
1225 goto err; 1218 goto err;
1226 1219
1227 len = outlen - ssl3_handshake_msg_hdr_len(s); 1220 len = outlen - DTLS1_HM_HEADER_LENGTH;
1228 1221
1229 dtls1_set_message_header(s, msg_type, len, 0, len); 1222 dtls1_set_message_header(s, msg_type, len, 0, len);
1230 dtls1_buffer_message(s, 0); 1223 dtls1_buffer_message(s, 0);
diff --git a/src/lib/libssl/ssl_local.h b/src/lib/libssl/ssl_local.h
index d5c218e50d..95913f81a6 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.40 2026/06/04 12:05:57 tb Exp $ */ 1/* $OpenBSD: ssl_local.h,v 1.41 2026/06/06 15:08:15 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 *
@@ -1309,7 +1309,6 @@ long ssl3_callback_ctrl(SSL *s, int cmd, void (*fp)(void));
1309long 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));
1310int ssl3_pending(const SSL *s); 1310int ssl3_pending(const SSL *s);
1311 1311
1312int ssl3_handshake_msg_hdr_len(SSL *s);
1313int ssl3_handshake_msg_start(SSL *s, CBB *handshake, CBB *body, 1312int ssl3_handshake_msg_start(SSL *s, CBB *handshake, CBB *body,
1314 uint8_t msg_type); 1313 uint8_t msg_type);
1315int ssl3_handshake_msg_finish(SSL *s, CBB *handshake); 1314int ssl3_handshake_msg_finish(SSL *s, CBB *handshake);