summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjsing <>2022-07-24 14:19:45 +0000
committerjsing <>2022-07-24 14:19:45 +0000
commitc804d574e337158da589e90dc9cbb13d6ffde44f (patch)
treee2ca939930790f4114e922f9ddb466ef7231f863 /src
parentd82a186f8c966e9a7dddbe974f3492a8d6fc42c8 (diff)
downloadopenbsd-c804d574e337158da589e90dc9cbb13d6ffde44f.tar.gz
openbsd-c804d574e337158da589e90dc9cbb13d6ffde44f.tar.bz2
openbsd-c804d574e337158da589e90dc9cbb13d6ffde44f.zip
Move tls13_phh_done_cb() after tl13_phh_received_cb().
This is the order that they're called/run in.
Diffstat (limited to 'src')
-rw-r--r--src/lib/libssl/tls13_lib.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/lib/libssl/tls13_lib.c b/src/lib/libssl/tls13_lib.c
index 9d62479f15..d63951a0ff 100644
--- a/src/lib/libssl/tls13_lib.c
+++ b/src/lib/libssl/tls13_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: tls13_lib.c,v 1.68 2022/07/24 14:16:29 jsing Exp $ */ 1/* $OpenBSD: tls13_lib.c,v 1.69 2022/07/24 14:19:45 jsing Exp $ */
2/* 2/*
3 * Copyright (c) 2018, 2019 Joel Sing <jsing@openbsd.org> 3 * Copyright (c) 2018, 2019 Joel Sing <jsing@openbsd.org>
4 * Copyright (c) 2019 Bob Beck <beck@openbsd.org> 4 * Copyright (c) 2019 Bob Beck <beck@openbsd.org>
@@ -328,17 +328,6 @@ tls13_key_update_recv(struct tls13_ctx *ctx, CBS *cbs)
328 return tls13_send_alert(ctx->rl, alert); 328 return tls13_send_alert(ctx->rl, alert);
329} 329}
330 330
331static void
332tls13_phh_done_cb(void *cb_arg)
333{
334 struct tls13_ctx *ctx = cb_arg;
335
336 if (ctx->key_update_request) {
337 tls13_phh_update_write_traffic_secret(ctx);
338 ctx->key_update_request = 0;
339 }
340}
341
342static ssize_t 331static ssize_t
343tls13_phh_received_cb(void *cb_arg) 332tls13_phh_received_cb(void *cb_arg)
344{ 333{
@@ -380,6 +369,17 @@ tls13_phh_received_cb(void *cb_arg)
380 return ret; 369 return ret;
381} 370}
382 371
372static void
373tls13_phh_done_cb(void *cb_arg)
374{
375 struct tls13_ctx *ctx = cb_arg;
376
377 if (ctx->key_update_request) {
378 tls13_phh_update_write_traffic_secret(ctx);
379 ctx->key_update_request = 0;
380 }
381}
382
383static const struct tls13_record_layer_callbacks rl_callbacks = { 383static const struct tls13_record_layer_callbacks rl_callbacks = {
384 .wire_read = tls13_legacy_wire_read_cb, 384 .wire_read = tls13_legacy_wire_read_cb,
385 .wire_write = tls13_legacy_wire_write_cb, 385 .wire_write = tls13_legacy_wire_write_cb,