From 0571c2d6103caa640769f38b1248f9d58e90c508 Mon Sep 17 00:00:00 2001 From: jsing Date: Wed, 22 Jan 2020 13:10:51 +0000 Subject: 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@ --- lib/libssl/tls13_server.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'lib/libssl/tls13_server.c') 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 * @@ -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; } -- cgit v1.2.3-59-g8ed1b