From 34bb3178dc6005cb170c6f002dfd49e503c94bf8 Mon Sep 17 00:00:00 2001 From: jsing <> Date: Sat, 6 Jun 2026 15:24:26 +0000 Subject: Move DTLS change cipher spec handling to its own function. When a TLSv1.2 change cipher spec 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/d1_both.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'src/lib/libssl/d1_both.c') diff --git a/src/lib/libssl/d1_both.c b/src/lib/libssl/d1_both.c index 0a0a80dad9..1e87d9e652 100644 --- a/src/lib/libssl/d1_both.c +++ b/src/lib/libssl/d1_both.c @@ -1,4 +1,4 @@ -/* $OpenBSD: d1_both.c,v 1.95 2026/06/06 15:22:25 jsing Exp $ */ +/* $OpenBSD: d1_both.c,v 1.96 2026/06/06 15:24:26 jsing Exp $ */ /* * DTLS implementation written by Nagendra Modadugu * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. @@ -1163,6 +1163,19 @@ dtls1_get_message_header(CBS *header, struct hm_header_st *msg_hdr) return 1; } +int +dtls12_ccs_built(SSL *s) +{ + s->d1->handshake_write_seq = s->d1->next_handshake_write_seq; + + dtls1_set_message_header_int(s, SSL3_MT_CCS, 0, + s->d1->handshake_write_seq, 0, 0); + + dtls1_buffer_message(s, 1); + + return 1; +} + int dtls12_handshake_msg_built(SSL *s) { -- cgit v1.2.3-55-g6feb