1
0
mirror of https://github.com/openbsd/src.git synced 2026-06-18 07:13:36 +02:00

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@
This commit is contained in:
jsing
2026-06-06 15:08:15 +00:00
parent d1317e99cc
commit 6176b0a2ef
2 changed files with 3 additions and 11 deletions
+2 -9
View File
@@ -1,4 +1,4 @@
/* $OpenBSD: s3_lib.c,v 1.258 2025/12/04 21:16:17 beck Exp $ */
/* $OpenBSD: s3_lib.c,v 1.259 2026/06/06 15:08:15 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -1162,13 +1162,6 @@ ssl3_pending(const SSL *s)
return tls_content_remaining(s->s3->rcontent);
}
int
ssl3_handshake_msg_hdr_len(SSL *s)
{
return (SSL_is_dtls(s) ? DTLS1_HM_HEADER_LENGTH :
SSL3_HM_HEADER_LENGTH);
}
int
ssl3_handshake_msg_start(SSL *s, CBB *handshake, CBB *body, uint8_t msg_type)
{
@@ -1224,7 +1217,7 @@ ssl3_handshake_msg_finish(SSL *s, CBB *handshake)
if (!CBS_get_u8(&cbs, &msg_type))
goto err;
len = outlen - ssl3_handshake_msg_hdr_len(s);
len = outlen - DTLS1_HM_HEADER_LENGTH;
dtls1_set_message_header(s, msg_type, len, 0, len);
dtls1_buffer_message(s, 0);
+1 -2
View File
@@ -1,4 +1,4 @@
/* $OpenBSD: ssl_local.h,v 1.40 2026/06/04 12:05:57 tb Exp $ */
/* $OpenBSD: ssl_local.h,v 1.41 2026/06/06 15:08:15 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -1309,7 +1309,6 @@ long ssl3_callback_ctrl(SSL *s, int cmd, void (*fp)(void));
long ssl3_ctx_callback_ctrl(SSL_CTX *s, int cmd, void (*fp)(void));
int ssl3_pending(const SSL *s);
int ssl3_handshake_msg_hdr_len(SSL *s);
int ssl3_handshake_msg_start(SSL *s, CBB *handshake, CBB *body,
uint8_t msg_type);
int ssl3_handshake_msg_finish(SSL *s, CBB *handshake);