summaryrefslogtreecommitdiff
path: root/src/lib/libssl/tls13_server.c
diff options
context:
space:
mode:
authorjsing <>2020-01-22 13:10:51 +0000
committerjsing <>2020-01-22 13:10:51 +0000
commit7655835d7e1b8fa812246e1e652a1747a4f67b32 (patch)
tree80ca1bcd2a0b8b6d5658a3b4bbec080ceced53e3 /src/lib/libssl/tls13_server.c
parente53889cb5c5ff4e8801ca99623f6e16491f94358 (diff)
downloadopenbsd-7655835d7e1b8fa812246e1e652a1747a4f67b32.tar.gz
openbsd-7655835d7e1b8fa812246e1e652a1747a4f67b32.tar.bz2
openbsd-7655835d7e1b8fa812246e1e652a1747a4f67b32.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 'src/lib/libssl/tls13_server.c')
-rw-r--r--src/lib/libssl/tls13_server.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/lib/libssl/tls13_server.c b/src/lib/libssl/tls13_server.c
index fc3e80ad58..90a339dc61 100644
--- a/src/lib/libssl/tls13_server.c
+++ b/src/lib/libssl/tls13_server.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: tls13_server.c,v 1.5 2020/01/22 05:06:23 tb Exp $ */ 1/* $OpenBSD: tls13_server.c,v 1.6 2020/01/22 13:10:51 jsing Exp $ */
2/* 2/*
3 * Copyright (c) 2019 Joel Sing <jsing@openbsd.org> 3 * Copyright (c) 2019 Joel Sing <jsing@openbsd.org>
4 * 4 *
@@ -79,7 +79,7 @@ tls13_legacy_accept(SSL *ssl)
79} 79}
80 80
81int 81int
82tls13_client_hello_recv(struct tls13_ctx *ctx) 82tls13_client_hello_recv(struct tls13_ctx *ctx, CBS *cbs)
83{ 83{
84 tls13_record_layer_allow_ccs(ctx->rl, 1); 84 tls13_record_layer_allow_ccs(ctx->rl, 1);
85 85
@@ -93,7 +93,7 @@ tls13_client_hello_retry_send(struct tls13_ctx *ctx)
93} 93}
94 94
95int 95int
96tls13_server_hello_retry_recv(struct tls13_ctx *ctx) 96tls13_server_hello_retry_recv(struct tls13_ctx *ctx, CBS *cbs)
97{ 97{
98 return 0; 98 return 0;
99} 99}
@@ -105,7 +105,7 @@ tls13_client_end_of_early_data_send(struct tls13_ctx *ctx)
105} 105}
106 106
107int 107int
108tls13_client_end_of_early_data_recv(struct tls13_ctx *ctx) 108tls13_client_end_of_early_data_recv(struct tls13_ctx *ctx, CBS *cbs)
109{ 109{
110 return 0; 110 return 0;
111} 111}
@@ -117,7 +117,7 @@ tls13_client_certificate_send(struct tls13_ctx *ctx)
117} 117}
118 118
119int 119int
120tls13_client_certificate_recv(struct tls13_ctx *ctx) 120tls13_client_certificate_recv(struct tls13_ctx *ctx, CBS *cbs)
121{ 121{
122 return 0; 122 return 0;
123} 123}
@@ -129,13 +129,13 @@ tls13_client_certificate_verify_send(struct tls13_ctx *ctx)
129} 129}
130 130
131int 131int
132tls13_client_certificate_verify_recv(struct tls13_ctx *ctx) 132tls13_client_certificate_verify_recv(struct tls13_ctx *ctx, CBS *cbs)
133{ 133{
134 return 0; 134 return 0;
135} 135}
136 136
137int 137int
138tls13_client_finished_recv(struct tls13_ctx *ctx) 138tls13_client_finished_recv(struct tls13_ctx *ctx, CBS *cbs)
139{ 139{
140 tls13_record_layer_allow_ccs(ctx->rl, 0); 140 tls13_record_layer_allow_ccs(ctx->rl, 0);
141 141
@@ -149,7 +149,7 @@ tls13_client_key_update_send(struct tls13_ctx *ctx)
149} 149}
150 150
151int 151int
152tls13_client_key_update_recv(struct tls13_ctx *ctx) 152tls13_client_key_update_recv(struct tls13_ctx *ctx, CBS *cbs)
153{ 153{
154 return 0; 154 return 0;
155} 155}