summaryrefslogtreecommitdiffstats
path: root/lib/libssl/tls13_client.c
diff options
context:
space:
mode:
authorjsing <jsing@openbsd.org>2019-02-14 17:55:31 +0000
committerjsing <jsing@openbsd.org>2019-02-14 17:55:31 +0000
commit46f83330140c87306f2ea23afad66ce0059467eb (patch)
treeb986cd159954eb4ba7a04006ce5b22d0807c8580 /lib/libssl/tls13_client.c
parentmpw.h is no longer needed. (diff)
downloadwireguard-openbsd-46f83330140c87306f2ea23afad66ce0059467eb.tar.xz
wireguard-openbsd-46f83330140c87306f2ea23afad66ce0059467eb.zip
Split tls13_record_layer_set_traffic_keys() into two separate functions.
This allows the read traffic key to be set independently of the write traffic key. This will become necessary for KeyUpdate handling, however also allows for switching to application traffic keys at more appropriate stages of the handshake. ok tb@
Diffstat (limited to 'lib/libssl/tls13_client.c')
-rw-r--r--lib/libssl/tls13_client.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/libssl/tls13_client.c b/lib/libssl/tls13_client.c
index c8345f3a368..5353b5a3c8e 100644
--- a/lib/libssl/tls13_client.c
+++ b/lib/libssl/tls13_client.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tls13_client.c,v 1.8 2019/02/13 16:29:18 jsing Exp $ */
+/* $OpenBSD: tls13_client.c,v 1.9 2019/02/14 17:55:31 jsing Exp $ */
/*
* Copyright (c) 2018, 2019 Joel Sing <jsing@openbsd.org>
*
@@ -308,8 +308,10 @@ tls13_server_hello_recv(struct tls13_ctx *ctx)
tls13_record_layer_set_aead(ctx->rl, ctx->aead);
tls13_record_layer_set_hash(ctx->rl, ctx->hash);
- if (!tls13_record_layer_set_traffic_keys(ctx->rl,
- &secrets->server_handshake_traffic,
+ if (!tls13_record_layer_set_read_traffic_key(ctx->rl,
+ &secrets->server_handshake_traffic))
+ goto err;
+ if (!tls13_record_layer_set_write_traffic_key(ctx->rl,
&secrets->client_handshake_traffic))
goto err;