From ea2a1c165f2ed603b827d3bc22b989c30325f200 Mon Sep 17 00:00:00 2001 From: jsing <> Date: Sat, 6 Jun 2026 15:22:25 +0000 Subject: Move DTLS handshake message handling to its own function. When a TLSv1.2 handshake message has been built, call a separate function that can handle the DTLS specific processing rather than including this in the TLS code. ok kenjiro@ tb@ --- src/lib/libssl/s3_lib.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'src/lib/libssl/s3_lib.c') diff --git a/src/lib/libssl/s3_lib.c b/src/lib/libssl/s3_lib.c index ee9a695ecd..df45df47fc 100644 --- a/src/lib/libssl/s3_lib.c +++ b/src/lib/libssl/s3_lib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: s3_lib.c,v 1.259 2026/06/06 15:08:15 jsing Exp $ */ +/* $OpenBSD: s3_lib.c,v 1.260 2026/06/06 15:22:25 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -1209,18 +1209,8 @@ ssl3_handshake_msg_finish(SSL *s, CBB *handshake) s->init_off = 0; if (SSL_is_dtls(s)) { - unsigned long len; - uint8_t msg_type; - CBS cbs; - - CBS_init(&cbs, data, outlen); - if (!CBS_get_u8(&cbs, &msg_type)) + if (!dtls12_handshake_msg_built(s)) goto err; - - len = outlen - DTLS1_HM_HEADER_LENGTH; - - dtls1_set_message_header(s, msg_type, len, 0, len); - dtls1_buffer_message(s, 0); } ret = 1; -- cgit v1.2.3-55-g6feb