From: jsing Date: Sun, 24 Jul 2022 14:19:45 +0000 (+0000) Subject: Move tls13_phh_done_cb() after tl13_phh_received_cb(). X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=4430b9a0203e938dd4f2c392db0642f152f89e8f;p=openbsd Move tls13_phh_done_cb() after tl13_phh_received_cb(). This is the order that they're called/run in. --- diff --git a/lib/libssl/tls13_lib.c b/lib/libssl/tls13_lib.c index 9d62479f150..d63951a0ff3 100644 --- a/lib/libssl/tls13_lib.c +++ b/lib/libssl/tls13_lib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tls13_lib.c,v 1.68 2022/07/24 14:16:29 jsing Exp $ */ +/* $OpenBSD: tls13_lib.c,v 1.69 2022/07/24 14:19:45 jsing Exp $ */ /* * Copyright (c) 2018, 2019 Joel Sing * Copyright (c) 2019 Bob Beck @@ -328,17 +328,6 @@ tls13_key_update_recv(struct tls13_ctx *ctx, CBS *cbs) return tls13_send_alert(ctx->rl, alert); } -static void -tls13_phh_done_cb(void *cb_arg) -{ - struct tls13_ctx *ctx = cb_arg; - - if (ctx->key_update_request) { - tls13_phh_update_write_traffic_secret(ctx); - ctx->key_update_request = 0; - } -} - static ssize_t tls13_phh_received_cb(void *cb_arg) { @@ -380,6 +369,17 @@ tls13_phh_received_cb(void *cb_arg) return ret; } +static void +tls13_phh_done_cb(void *cb_arg) +{ + struct tls13_ctx *ctx = cb_arg; + + if (ctx->key_update_request) { + tls13_phh_update_write_traffic_secret(ctx); + ctx->key_update_request = 0; + } +} + static const struct tls13_record_layer_callbacks rl_callbacks = { .wire_read = tls13_legacy_wire_read_cb, .wire_write = tls13_legacy_wire_write_cb,