summaryrefslogtreecommitdiffstats
path: root/lib/libssl/tls13_server.c
diff options
context:
space:
mode:
authorjsing <jsing@openbsd.org>2020-01-22 13:10:51 +0000
committerjsing <jsing@openbsd.org>2020-01-22 13:10:51 +0000
commit0571c2d6103caa640769f38b1248f9d58e90c508 (patch)
treea0c9e71d687a58de24dd68201a175f169f3ddc8a /lib/libssl/tls13_server.c
parentFix things so that `make -DTLS1_3` works again. (diff)
downloadwireguard-openbsd-0571c2d6103caa640769f38b1248f9d58e90c508.tar.xz
wireguard-openbsd-0571c2d6103caa640769f38b1248f9d58e90c508.zip
Pass a handshake message content CBS to TLSv1.3 receive handlers.
This avoids every receive handler from having to get the handshake message content itself. Additionally, pull the trailing data check up so that each receive handler does not have to implement it. This makes the code more readable and reduces duplication. ok beck@ tb@
Diffstat (limited to 'lib/libssl/tls13_server.c')
-rw-r--r--lib/libssl/tls13_server.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/libssl/tls13_server.c b/lib/libssl/tls13_server.c
index fc3e80ad587..90a339dc612 100644
--- a/lib/libssl/tls13_server.c
+++ b/lib/libssl/tls13_server.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tls13_server.c,v 1.5 2020/01/22 05:06:23 tb Exp $ */
+/* $OpenBSD: tls13_server.c,v 1.6 2020/01/22 13:10:51 jsing Exp $ */
/*
* Copyright (c) 2019 Joel Sing <jsing@openbsd.org>
*
@@ -79,7 +79,7 @@ tls13_legacy_accept(SSL *ssl)
}
int
-tls13_client_hello_recv(struct tls13_ctx *ctx)
+tls13_client_hello_recv(struct tls13_ctx *ctx, CBS *cbs)
{
tls13_record_layer_allow_ccs(ctx->rl, 1);
@@ -93,7 +93,7 @@ tls13_client_hello_retry_send(struct tls13_ctx *ctx)
}
int
-tls13_server_hello_retry_recv(struct tls13_ctx *ctx)
+tls13_server_hello_retry_recv(struct tls13_ctx *ctx, CBS *cbs)
{
return 0;
}
@@ -105,7 +105,7 @@ tls13_client_end_of_early_data_send(struct tls13_ctx *ctx)
}
int
-tls13_client_end_of_early_data_recv(struct tls13_ctx *ctx)
+tls13_client_end_of_early_data_recv(struct tls13_ctx *ctx, CBS *cbs)
{
return 0;
}
@@ -117,7 +117,7 @@ tls13_client_certificate_send(struct tls13_ctx *ctx)
}
int
-tls13_client_certificate_recv(struct tls13_ctx *ctx)
+tls13_client_certificate_recv(struct tls13_ctx *ctx, CBS *cbs)
{
return 0;
}
@@ -129,13 +129,13 @@ tls13_client_certificate_verify_send(struct tls13_ctx *ctx)
}
int
-tls13_client_certificate_verify_recv(struct tls13_ctx *ctx)
+tls13_client_certificate_verify_recv(struct tls13_ctx *ctx, CBS *cbs)
{
return 0;
}
int
-tls13_client_finished_recv(struct tls13_ctx *ctx)
+tls13_client_finished_recv(struct tls13_ctx *ctx, CBS *cbs)
{
tls13_record_layer_allow_ccs(ctx->rl, 0);
@@ -149,7 +149,7 @@ tls13_client_key_update_send(struct tls13_ctx *ctx)
}
int
-tls13_client_key_update_recv(struct tls13_ctx *ctx)
+tls13_client_key_update_recv(struct tls13_ctx *ctx, CBS *cbs)
{
return 0;
}