summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libssl/Makefile4
-rw-r--r--src/lib/libssl/tls13_handshake.c538
-rw-r--r--src/lib/libssl/tls13_internal.h69
3 files changed, 607 insertions, 4 deletions
diff --git a/src/lib/libssl/Makefile b/src/lib/libssl/Makefile
index 762ca0d18d..3969b453a5 100644
--- a/src/lib/libssl/Makefile
+++ b/src/lib/libssl/Makefile
@@ -1,4 +1,4 @@
1# $OpenBSD: Makefile,v 1.41 2018/11/07 19:43:12 beck Exp $ 1# $OpenBSD: Makefile,v 1.42 2018/11/08 23:54:59 tb Exp $
2 2
3.include <bsd.own.mk> 3.include <bsd.own.mk>
4.ifndef NOMAN 4.ifndef NOMAN
@@ -34,7 +34,7 @@ SRCS= \
34 ssl_asn1.c ssl_txt.c ssl_algs.c \ 34 ssl_asn1.c ssl_txt.c ssl_algs.c \
35 bio_ssl.c ssl_err.c ssl_methods.c \ 35 bio_ssl.c ssl_err.c ssl_methods.c \
36 ssl_packet.c ssl_tlsext.c ssl_versions.c pqueue.c ssl_init.c \ 36 ssl_packet.c ssl_tlsext.c ssl_versions.c pqueue.c ssl_init.c \
37 tls13_key_schedule.c 37 tls13_handshake.c tls13_key_schedule.c
38SRCS+= s3_cbc.c 38SRCS+= s3_cbc.c
39SRCS+= bs_ber.c bs_cbb.c bs_cbs.c 39SRCS+= bs_ber.c bs_cbb.c bs_cbs.c
40 40
diff --git a/src/lib/libssl/tls13_handshake.c b/src/lib/libssl/tls13_handshake.c
new file mode 100644
index 0000000000..e383d969f3
--- /dev/null
+++ b/src/lib/libssl/tls13_handshake.c
@@ -0,0 +1,538 @@
1/* $OpenBSD: tls13_handshake.c,v 1.1 2018/11/08 23:54:59 tb Exp $ */
2/*
3 * Copyright (c) 2018 Theo Buehler <tb@openbsd.org>
4 *
5 * Permission to use, copy, modify, and distribute this software for any
6 * purpose with or without fee is hereby granted, provided that the above
7 * copyright notice and this permission notice appear in all copies.
8 *
9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 */
17
18#include <stddef.h>
19
20#include "tls13_internal.h"
21
22/* Based on RFC 8446 and inspired by s2n's TLS 1.2 state machine. */
23
24/* Record types */
25#define TLS13_HANDSHAKE 1
26#define TLS13_APPLICATION_DATA 2
27
28/* Indexing into the state machine */
29struct tls13_handshake {
30 uint8_t hs_type;
31#define INITIAL 0x00
32#define NEGOTIATED 0x01
33#define WITH_CERT_REQ 0x02
34#define WITH_HELLO_RET_REQ 0x04
35#define WITH_PSK 0x08
36 int message_number;
37};
38
39struct tls13_ctx {
40 uint8_t mode;
41#define TLS13_HS_MODE_CLIENT 0
42#define TLS13_HS_MODE_SERVER 1
43 struct tls13_handshake handshake;
44};
45
46struct tls13_handshake_action {
47 uint8_t record_type;
48 uint8_t handshake_type;
49
50 uint8_t writer;
51#define TLS13_HS_CLIENT_WRITES 1
52#define TLS13_HS_SERVER_WRITES 2
53#define TLS13_HS_BOTH_WRITE (TLS13_HS_CLIENT_WRITES|TLS13_HS_SERVER_WRITES)
54
55 int (*handler[2])(struct tls13_ctx *ctx);
56};
57
58enum tls13_message_type tls13_handshake_active_state(struct tls13_ctx *ctx);
59int tls13_handshake_get_writer(struct tls13_ctx *ctx);
60
61int tls13_advance_state_machine(struct tls13_ctx *ctx);
62
63int tls13_connect(struct tls13_ctx *ctx);
64int tls13_accept(struct tls13_ctx *ctx);
65
66int tls13_handshake_advance_state_machine(struct tls13_ctx *ctx);
67
68int tls13_handshake_write_action(struct tls13_ctx *ctx);
69int tls13_handshake_read_action(struct tls13_ctx *ctx);
70
71enum tls13_message_type {
72 CLIENT_HELLO,
73 CLIENT_HELLO_RETRY,
74 CLIENT_END_OF_EARLY_DATA,
75 CLIENT_CERTIFICATE,
76 CLIENT_CERTIFICATE_VERIFY,
77 CLIENT_FINISHED,
78 CLIENT_KEY_UPDATE,
79 SERVER_HELLO,
80 SERVER_NEW_SESSION_TICKET,
81 SERVER_ENCRYPTED_EXTENSIONS,
82 SERVER_CERTIFICATE,
83 SERVER_CERTIFICATE_VERIFY,
84 SERVER_CERTIFICATE_REQUEST,
85 SERVER_FINISHED,
86 SERVER_KEY_UPDATE,
87 SERVER_MESSAGE_HASH,
88 APPLICATION_DATA,
89};
90
91struct tls13_handshake_action state_machine[] = {
92 [CLIENT_HELLO] = {
93 TLS13_HANDSHAKE,
94 TLS13_MT_CLIENT_HELLO,
95 TLS13_HS_CLIENT_WRITES,
96 {tls13_client_hello_send, tls13_client_hello_recv},
97 },
98 [CLIENT_HELLO_RETRY] = {
99 TLS13_HANDSHAKE,
100 TLS13_MT_CLIENT_HELLO,
101 TLS13_HS_CLIENT_WRITES,
102 {tls13_client_hello_retry_send, tls13_client_hello_retry_recv},
103 },
104 [CLIENT_END_OF_EARLY_DATA] = {
105 TLS13_HANDSHAKE,
106 TLS13_MT_END_OF_EARLY_DATA,
107 TLS13_HS_CLIENT_WRITES,
108 {tls13_client_end_of_early_data_send,
109 tls13_client_end_of_early_data_recv},
110 },
111 [CLIENT_CERTIFICATE] = {
112 TLS13_HANDSHAKE,
113 TLS13_MT_CERTIFICATE,
114 TLS13_HS_CLIENT_WRITES,
115 {tls13_client_certificate_send,
116 tls13_client_certificate_recv},
117 },
118 [CLIENT_CERTIFICATE_VERIFY] = {
119 TLS13_HANDSHAKE,
120 TLS13_MT_CERTIFICATE_VERIFY,
121 TLS13_HS_CLIENT_WRITES,
122 {tls13_client_certificate_verify_send,
123 tls13_client_certificate_verify_recv},
124 },
125 [CLIENT_FINISHED] = {
126 TLS13_HANDSHAKE,
127 TLS13_MT_FINISHED,
128 TLS13_HS_CLIENT_WRITES,
129 {tls13_client_finished_recv, tls13_client_finished_send}
130 },
131 [CLIENT_KEY_UPDATE] = {
132 TLS13_HANDSHAKE,
133 TLS13_MT_KEY_UPDATE,
134 TLS13_HS_CLIENT_WRITES,
135 {tls13_client_key_update_send, tls13_client_key_update_recv},
136 },
137 [SERVER_HELLO] = {
138 TLS13_HANDSHAKE,
139 TLS13_MT_SERVER_HELLO,
140 TLS13_HS_SERVER_WRITES,
141 {tls13_server_hello_recv, tls13_server_hello_send},
142 },
143 [SERVER_NEW_SESSION_TICKET] = {
144 TLS13_HANDSHAKE,
145 TLS13_MT_NEW_SESSION_TICKET,
146 TLS13_HS_SERVER_WRITES,
147 {tls13_server_new_session_ticket_recv,
148 tls13_server_new_session_ticket_send},
149 },
150 [SERVER_ENCRYPTED_EXTENSIONS] = {
151 TLS13_HANDSHAKE,
152 TLS13_MT_ENCRYPTED_EXTENSIONS,
153 TLS13_HS_SERVER_WRITES,
154 {tls13_server_encrypted_extensions_recv,
155 tls13_server_encrypted_extensions_send},
156 },
157 [SERVER_CERTIFICATE] = {
158 TLS13_HANDSHAKE,
159 TLS13_MT_CERTIFICATE,
160 TLS13_HS_SERVER_WRITES,
161 {tls13_server_certificate_recv, tls13_server_certificate_send},
162 },
163 [SERVER_CERTIFICATE_REQUEST] = {
164 TLS13_HANDSHAKE,
165 TLS13_MT_CERTIFICATE,
166 TLS13_HS_SERVER_WRITES,
167 {tls13_server_certificate_request_recv,
168 tls13_server_certificate_request_send},
169 },
170 [SERVER_CERTIFICATE_VERIFY] = {
171 TLS13_HANDSHAKE,
172 TLS13_MT_CERTIFICATE_VERIFY,
173 TLS13_HS_SERVER_WRITES,
174 {tls13_server_certificate_verify_send,
175 tls13_server_certificate_verify_recv},
176 },
177 [SERVER_FINISHED] = {
178 TLS13_HANDSHAKE,
179 TLS13_MT_FINISHED,
180 TLS13_HS_SERVER_WRITES,
181 {tls13_server_finished_recv, tls13_server_finished_send}
182 },
183 [SERVER_KEY_UPDATE] = {
184 TLS13_HANDSHAKE,
185 TLS13_MT_KEY_UPDATE,
186 TLS13_HS_SERVER_WRITES,
187 {tls13_server_key_update_recv, tls13_server_key_update_send},
188 },
189 [SERVER_MESSAGE_HASH] = {
190 TLS13_HANDSHAKE,
191 TLS13_MT_MESSAGE_HASH,
192 TLS13_HS_SERVER_WRITES,
193 {tls13_server_message_hash_recv,
194 tls13_server_message_hash_send},
195 },
196 [APPLICATION_DATA] = {
197 TLS13_APPLICATION_DATA,
198 0,
199 TLS13_HS_BOTH_WRITE,
200 {NULL, NULL},
201 },
202};
203
204static enum tls13_message_type handshakes[][16] = {
205 [INITIAL] = {
206 CLIENT_HELLO,
207 SERVER_HELLO,
208 },
209 [NEGOTIATED] = {
210 CLIENT_HELLO,
211 SERVER_HELLO,
212 SERVER_ENCRYPTED_EXTENSIONS,
213 SERVER_CERTIFICATE,
214 SERVER_CERTIFICATE_VERIFY,
215 SERVER_FINISHED,
216 CLIENT_FINISHED,
217 APPLICATION_DATA,
218 },
219 [NEGOTIATED | WITH_HELLO_RET_REQ] = {
220 CLIENT_HELLO,
221 SERVER_HELLO,
222 CLIENT_HELLO_RETRY,
223 SERVER_ENCRYPTED_EXTENSIONS,
224 SERVER_CERTIFICATE,
225 SERVER_CERTIFICATE_VERIFY,
226 SERVER_FINISHED,
227 CLIENT_FINISHED,
228 APPLICATION_DATA,
229 },
230 [NEGOTIATED | WITH_CERT_REQ] = {
231 CLIENT_HELLO,
232 SERVER_HELLO,
233 SERVER_ENCRYPTED_EXTENSIONS,
234 SERVER_CERTIFICATE_REQUEST,
235 SERVER_CERTIFICATE,
236 SERVER_CERTIFICATE_VERIFY,
237 SERVER_FINISHED,
238 CLIENT_FINISHED,
239 APPLICATION_DATA,
240 },
241 [NEGOTIATED | WITH_HELLO_RET_REQ | WITH_CERT_REQ] = {
242 CLIENT_HELLO,
243 SERVER_HELLO,
244 CLIENT_HELLO_RETRY,
245 SERVER_ENCRYPTED_EXTENSIONS,
246 SERVER_CERTIFICATE_REQUEST,
247 SERVER_CERTIFICATE,
248 SERVER_CERTIFICATE_VERIFY,
249 SERVER_FINISHED,
250 CLIENT_FINISHED,
251 APPLICATION_DATA,
252 },
253 [NEGOTIATED | WITH_PSK] = {
254 CLIENT_HELLO,
255 SERVER_HELLO,
256 SERVER_ENCRYPTED_EXTENSIONS,
257 SERVER_FINISHED,
258 CLIENT_FINISHED,
259 APPLICATION_DATA,
260 },
261 [NEGOTIATED | WITH_HELLO_RET_REQ | WITH_PSK] = {
262 CLIENT_HELLO,
263 SERVER_HELLO,
264 CLIENT_HELLO_RETRY,
265 SERVER_ENCRYPTED_EXTENSIONS,
266 SERVER_FINISHED,
267 CLIENT_FINISHED,
268 APPLICATION_DATA,
269 },
270};
271
272enum tls13_message_type
273tls13_handshake_active_state(struct tls13_ctx *ctx)
274{
275 struct tls13_handshake hs = ctx->handshake;
276 return handshakes[hs.hs_type][hs.message_number];
277}
278
279int
280tls13_handshake_get_writer(struct tls13_ctx *ctx)
281{
282 enum tls13_message_type mt = tls13_handshake_active_state(ctx);
283 return state_machine[mt].writer;
284}
285
286int
287tls13_connect(struct tls13_ctx *ctx)
288{
289 ctx->mode = TLS13_HS_MODE_CLIENT;
290
291 while (tls13_handshake_get_writer(ctx) != TLS13_HS_BOTH_WRITE) {
292 if (tls13_handshake_get_writer(ctx) == TLS13_HS_MODE_CLIENT) {
293 if (!tls13_handshake_write_action(ctx))
294 return 0;
295 } else {
296 if (!tls13_handshake_read_action(ctx))
297 return 0;
298 }
299 if (!tls13_handshake_advance_state_machine(ctx))
300 return 0;
301 }
302
303 return 1;
304}
305
306int
307tls13_accept(struct tls13_ctx *ctx)
308{
309 ctx->mode = TLS13_HS_MODE_SERVER;
310
311 while (tls13_handshake_get_writer(ctx) != TLS13_HS_BOTH_WRITE) {
312 if (tls13_handshake_get_writer(ctx) == TLS13_HS_MODE_CLIENT) {
313 if (!tls13_handshake_write_action(ctx))
314 return 0;
315 } else {
316 if (!tls13_handshake_read_action(ctx))
317 return 0;
318 }
319 if (!tls13_handshake_advance_state_machine(ctx))
320 return 0;
321 }
322
323 return 1;
324}
325
326int
327tls13_advance_state_machine(struct tls13_ctx *ctx)
328{
329 if (tls13_handshake_get_writer(ctx) == TLS13_HS_BOTH_WRITE)
330 return 0;
331 ctx->handshake.message_number++;
332 return 1;
333}
334
335int
336tls13_handshake_write_action(struct tls13_ctx *ctx)
337{
338 return 1;
339}
340
341int
342tls13_handshake_read_action(struct tls13_ctx *ctx)
343{
344 return 1;
345}
346
347int
348tls13_client_hello_send(struct tls13_ctx *ctx)
349{
350 return 1;
351}
352
353int
354tls13_client_hello_recv(struct tls13_ctx *ctx)
355{
356 return 1;
357}
358
359int
360tls13_client_hello_retry_send(struct tls13_ctx *ctx)
361{
362 return 1;
363}
364
365int
366tls13_client_hello_retry_recv(struct tls13_ctx *ctx)
367{
368 return 1;
369}
370
371
372int
373tls13_client_end_of_early_data_send(struct tls13_ctx *ctx)
374{
375 return 1;
376}
377
378int
379tls13_client_end_of_early_data_recv(struct tls13_ctx *ctx)
380{
381 return 1;
382}
383
384int
385tls13_client_certificate_send(struct tls13_ctx *ctx)
386{
387 return 1;
388}
389
390int
391tls13_client_certificate_recv(struct tls13_ctx *ctx)
392{
393 return 1;
394}
395
396int
397tls13_client_certificate_verify_send(struct tls13_ctx *ctx)
398{
399 return 1;
400}
401
402int
403tls13_client_certificate_verify_recv(struct tls13_ctx *ctx)
404{
405 return 1;
406}
407
408int
409tls13_client_finished_recv(struct tls13_ctx *ctx)
410{
411 return 1;
412}
413
414int
415tls13_client_finished_send(struct tls13_ctx *ctx)
416{
417 return 1;
418}
419
420int
421tls13_client_key_update_send(struct tls13_ctx *ctx)
422{
423 return 1;
424}
425
426int
427tls13_client_key_update_recv(struct tls13_ctx *ctx)
428{
429 return 1;
430}
431
432int
433tls13_server_hello_recv(struct tls13_ctx *ctx)
434{
435 return 1;
436}
437
438int
439tls13_server_hello_send(struct tls13_ctx *ctx)
440{
441 return 1;
442}
443
444int
445tls13_server_new_session_ticket_recv(struct tls13_ctx *ctx)
446{
447 return 1;
448}
449
450int
451tls13_server_new_session_ticket_send(struct tls13_ctx *ctx)
452{
453 return 1;
454}
455
456int
457tls13_server_encrypted_extensions_recv(struct tls13_ctx *ctx)
458{
459 return 1;
460}
461
462int
463tls13_server_encrypted_extensions_send(struct tls13_ctx *ctx)
464{
465 return 1;
466}
467
468int
469tls13_server_certificate_recv(struct tls13_ctx *ctx)
470{
471 return 1;
472}
473
474int
475tls13_server_certificate_send(struct tls13_ctx *ctx)
476{
477 return 1;
478}
479
480int
481tls13_server_certificate_request_recv(struct tls13_ctx *ctx)
482{
483 return 1;
484}
485
486int
487tls13_server_certificate_request_send(struct tls13_ctx *ctx)
488{
489 return 1;
490}
491
492int
493tls13_server_certificate_verify_send(struct tls13_ctx *ctx)
494{
495 return 1;
496}
497
498int
499tls13_server_certificate_verify_recv(struct tls13_ctx *ctx)
500{
501 return 1;
502}
503
504int
505tls13_server_finished_recv(struct tls13_ctx *ctx)
506{
507 return 1;
508}
509
510int
511tls13_server_finished_send(struct tls13_ctx *ctx)
512{
513 return 1;
514}
515
516int
517tls13_server_key_update_recv(struct tls13_ctx *ctx)
518{
519 return 1;
520}
521
522int
523tls13_server_key_update_send(struct tls13_ctx *ctx)
524{
525 return 1;
526}
527
528int
529tls13_server_message_hash_recv(struct tls13_ctx *ctx)
530{
531 return 1;
532}
533
534int
535tls13_server_message_hash_send(struct tls13_ctx *ctx)
536{
537 return 1;
538}
diff --git a/src/lib/libssl/tls13_internal.h b/src/lib/libssl/tls13_internal.h
index 6172ac25c9..0c48c87c89 100644
--- a/src/lib/libssl/tls13_internal.h
+++ b/src/lib/libssl/tls13_internal.h
@@ -1,5 +1,7 @@
1/* $OpenBSD: tls13_internal.h,v 1.2 2018/11/08 20:38:25 tb Exp $ */ 1/* $OpenBSD: tls13_internal.h,v 1.3 2018/11/08 23:54:59 tb Exp $ */
2/* Copyright (c) 2018, Bob Beck <beck@openbsd.org> 2/*
3 * Copyright (c) 2018, Bob Beck <beck@openbsd.org>
4 * Copyright (c) 2018, Theo Buehler <tb@openbsd.org>
3 * 5 *
4 * Permission to use, copy, modify, and/or distribute this software for any 6 * Permission to use, copy, modify, and/or distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above 7 * purpose with or without fee is hereby granted, provided that the above
@@ -58,3 +60,66 @@ int tls13_derive_handshake_secrets(struct tls13_secrets *secrets,
58 const struct tls13_secret *context); 60 const struct tls13_secret *context);
59int tls13_derive_application_secrets(struct tls13_secrets *secrets, 61int tls13_derive_application_secrets(struct tls13_secrets *secrets,
60 const EVP_MD *digest, const struct tls13_secret *context); 62 const EVP_MD *digest, const struct tls13_secret *context);
63
64struct tls13_ctx;
65
66/*
67 * RFC 8446, Section B.3
68 *
69 * Values listed as "_RESERVED" were used in previous versions of TLS and are
70 * listed here for completeness. TLS 1.3 implementations MUST NOT send them but
71 * might receive them from older TLS implementations.
72 */
73#define TLS13_MT_HELLO_REQUEST_RESERVED 0
74#define TLS13_MT_CLIENT_HELLO 1
75#define TLS13_MT_SERVER_HELLO 2
76#define TLS13_MT_HELLO_VERIFY_REQUEST_RESERVED 3
77#define TLS13_MT_NEW_SESSION_TICKET 4
78#define TLS13_MT_END_OF_EARLY_DATA 5
79#define TLS13_MT_HELLO_RETRY_REQUEST_RESERVED 6
80#define TLS13_MT_ENCRYPTED_EXTENSIONS 8
81#define TLS13_MT_CERTIFICATE 11
82#define TLS13_MT_SERVER_KEY_EXCHANGE_RESERVED 12
83#define TLS13_MT_CERTIFICATE_REQUEST 13
84#define TLS13_MT_SERVER_HELLO_DONE_RESERVED 14
85#define TLS13_MT_CERTIFICATE_VERIFY 15
86#define TLS13_MT_CLIENT_KEY_EXCHANGE_RESERVED 16
87#define TLS13_MT_FINISHED 20
88#define TLS13_MT_CERTIFICATE_URL_RESERVED 21
89#define TLS13_MT_CERTIFICATE_STATUS_RESERVED 22
90#define TLS13_MT_SUPPLEMENTAL_DATA_RESERVED 23
91#define TLS13_MT_KEY_UPDATE 24
92#define TLS13_MT_MESSAGE_HASH 254
93
94int tls13_client_hello_send(struct tls13_ctx *ctx);
95int tls13_client_hello_recv(struct tls13_ctx *ctx);
96int tls13_client_hello_retry_send(struct tls13_ctx *ctx);
97int tls13_client_hello_retry_recv(struct tls13_ctx *ctx);
98int tls13_client_end_of_early_data_send(struct tls13_ctx *ctx);
99int tls13_client_end_of_early_data_recv(struct tls13_ctx *ctx);
100int tls13_client_certificate_send(struct tls13_ctx *ctx);
101int tls13_client_certificate_recv(struct tls13_ctx *ctx);
102int tls13_client_certificate_verify_send(struct tls13_ctx *ctx);
103int tls13_client_certificate_verify_recv(struct tls13_ctx *ctx);
104int tls13_client_finished_recv(struct tls13_ctx *ctx);
105int tls13_client_finished_send(struct tls13_ctx *ctx);
106int tls13_client_key_update_send(struct tls13_ctx *ctx);
107int tls13_client_key_update_recv(struct tls13_ctx *ctx);
108int tls13_server_hello_recv(struct tls13_ctx *ctx);
109int tls13_server_hello_send(struct tls13_ctx *ctx);
110int tls13_server_new_session_ticket_recv(struct tls13_ctx *ctx);
111int tls13_server_new_session_ticket_send(struct tls13_ctx *ctx);
112int tls13_server_encrypted_extensions_recv(struct tls13_ctx *ctx);
113int tls13_server_encrypted_extensions_send(struct tls13_ctx *ctx);
114int tls13_server_certificate_recv(struct tls13_ctx *ctx);
115int tls13_server_certificate_send(struct tls13_ctx *ctx);
116int tls13_server_certificate_request_recv(struct tls13_ctx *ctx);
117int tls13_server_certificate_request_send(struct tls13_ctx *ctx);
118int tls13_server_certificate_verify_send(struct tls13_ctx *ctx);
119int tls13_server_certificate_verify_recv(struct tls13_ctx *ctx);
120int tls13_server_finished_recv(struct tls13_ctx *ctx);
121int tls13_server_finished_send(struct tls13_ctx *ctx);
122int tls13_server_key_update_recv(struct tls13_ctx *ctx);
123int tls13_server_key_update_send(struct tls13_ctx *ctx);
124int tls13_server_message_hash_recv(struct tls13_ctx *ctx);
125int tls13_server_message_hash_send(struct tls13_ctx *ctx);