summaryrefslogtreecommitdiff
path: root/src/lib/libssl/s3_lib.c
diff options
context:
space:
mode:
authorjsing <>2026-06-06 15:22:25 +0000
committerjsing <>2026-06-06 15:22:25 +0000
commitea2a1c165f2ed603b827d3bc22b989c30325f200 (patch)
tree12c0bfba49e96fa8237ea6a14943c6be2807405a /src/lib/libssl/s3_lib.c
parent8191edd9cf4fcae6a4e5e054326fdf2e620b353b (diff)
downloadopenbsd-ea2a1c165f2ed603b827d3bc22b989c30325f200.tar.gz
openbsd-ea2a1c165f2ed603b827d3bc22b989c30325f200.tar.bz2
openbsd-ea2a1c165f2ed603b827d3bc22b989c30325f200.zip
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@
Diffstat (limited to 'src/lib/libssl/s3_lib.c')
-rw-r--r--src/lib/libssl/s3_lib.c14
1 files changed, 2 insertions, 12 deletions
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 @@
1/* $OpenBSD: s3_lib.c,v 1.259 2026/06/06 15:08:15 jsing Exp $ */ 1/* $OpenBSD: s3_lib.c,v 1.260 2026/06/06 15:22:25 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 *
@@ -1209,18 +1209,8 @@ ssl3_handshake_msg_finish(SSL *s, CBB *handshake)
1209 s->init_off = 0; 1209 s->init_off = 0;
1210 1210
1211 if (SSL_is_dtls(s)) { 1211 if (SSL_is_dtls(s)) {
1212 unsigned long len; 1212 if (!dtls12_handshake_msg_built(s))
1213 uint8_t msg_type;
1214 CBS cbs;
1215
1216 CBS_init(&cbs, data, outlen);
1217 if (!CBS_get_u8(&cbs, &msg_type))
1218 goto err; 1213 goto err;
1219
1220 len = outlen - DTLS1_HM_HEADER_LENGTH;
1221
1222 dtls1_set_message_header(s, msg_type, len, 0, len);
1223 dtls1_buffer_message(s, 0);
1224 } 1214 }
1225 1215
1226 ret = 1; 1216 ret = 1;