diff options
author | jsing <> | 2020-01-22 13:10:51 +0000 |
---|---|---|
committer | jsing <> | 2020-01-22 13:10:51 +0000 |
commit | 7655835d7e1b8fa812246e1e652a1747a4f67b32 (patch) | |
tree | 80ca1bcd2a0b8b6d5658a3b4bbec080ceced53e3 /src/lib/libssl/tls13_server.c | |
parent | e53889cb5c5ff4e8801ca99623f6e16491f94358 (diff) | |
download | openbsd-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.c | 16 |
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 | ||
81 | int | 81 | int |
82 | tls13_client_hello_recv(struct tls13_ctx *ctx) | 82 | tls13_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 | ||
95 | int | 95 | int |
96 | tls13_server_hello_retry_recv(struct tls13_ctx *ctx) | 96 | tls13_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 | ||
107 | int | 107 | int |
108 | tls13_client_end_of_early_data_recv(struct tls13_ctx *ctx) | 108 | tls13_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 | ||
119 | int | 119 | int |
120 | tls13_client_certificate_recv(struct tls13_ctx *ctx) | 120 | tls13_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 | ||
131 | int | 131 | int |
132 | tls13_client_certificate_verify_recv(struct tls13_ctx *ctx) | 132 | tls13_client_certificate_verify_recv(struct tls13_ctx *ctx, CBS *cbs) |
133 | { | 133 | { |
134 | return 0; | 134 | return 0; |
135 | } | 135 | } |
136 | 136 | ||
137 | int | 137 | int |
138 | tls13_client_finished_recv(struct tls13_ctx *ctx) | 138 | tls13_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 | ||
151 | int | 151 | int |
152 | tls13_client_key_update_recv(struct tls13_ctx *ctx) | 152 | tls13_client_key_update_recv(struct tls13_ctx *ctx, CBS *cbs) |
153 | { | 153 | { |
154 | return 0; | 154 | return 0; |
155 | } | 155 | } |