diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libssl/tls13_client.c | 5 | ||||
-rw-r--r-- | src/lib/libssl/tls13_handshake.c | 24 | ||||
-rw-r--r-- | src/lib/libssl/tls13_handshake.h | 3 | ||||
-rw-r--r-- | src/lib/libssl/tls13_internal.h | 4 |
4 files changed, 29 insertions, 7 deletions
diff --git a/src/lib/libssl/tls13_client.c b/src/lib/libssl/tls13_client.c index 1729401505..a9f1b6bbd5 100644 --- a/src/lib/libssl/tls13_client.c +++ b/src/lib/libssl/tls13_client.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: tls13_client.c,v 1.15 2019/04/04 16:53:57 jsing Exp $ */ | 1 | /* $OpenBSD: tls13_client.c,v 1.16 2019/04/05 20:23:38 tb Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2018, 2019 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2018, 2019 Joel Sing <jsing@openbsd.org> |
4 | * | 4 | * |
@@ -339,9 +339,6 @@ tls13_server_hello_recv(struct tls13_ctx *ctx) | |||
339 | if (s->method->internal->version < TLS1_3_VERSION) | 339 | if (s->method->internal->version < TLS1_3_VERSION) |
340 | return 1; | 340 | return 1; |
341 | 341 | ||
342 | if (ctx->handshake_stage.hs_type & WITH_HRR) | ||
343 | return 1; | ||
344 | |||
345 | /* XXX - handle other key share types. */ | 342 | /* XXX - handle other key share types. */ |
346 | if (ctx->hs->x25519_peer_public == NULL) { | 343 | if (ctx->hs->x25519_peer_public == NULL) { |
347 | /* XXX - alert. */ | 344 | /* XXX - alert. */ |
diff --git a/src/lib/libssl/tls13_handshake.c b/src/lib/libssl/tls13_handshake.c index fd49e03adc..542410bd39 100644 --- a/src/lib/libssl/tls13_handshake.c +++ b/src/lib/libssl/tls13_handshake.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: tls13_handshake.c,v 1.34 2019/04/05 05:13:12 tb Exp $ */ | 1 | /* $OpenBSD: tls13_handshake.c,v 1.35 2019/04/05 20:23:38 tb Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2018-2019 Theo Buehler <tb@openbsd.org> | 3 | * Copyright (c) 2018-2019 Theo Buehler <tb@openbsd.org> |
4 | * Copyright (c) 2019 Joel Sing <jsing@openbsd.org> | 4 | * Copyright (c) 2019 Joel Sing <jsing@openbsd.org> |
@@ -98,6 +98,12 @@ struct tls13_handshake_action state_machine[] = { | |||
98 | .send = tls13_server_hello_send, | 98 | .send = tls13_server_hello_send, |
99 | .recv = tls13_server_hello_recv, | 99 | .recv = tls13_server_hello_recv, |
100 | }, | 100 | }, |
101 | [SERVER_HELLO_RETRY] = { | ||
102 | .handshake_type = TLS13_MT_SERVER_HELLO, | ||
103 | .sender = TLS13_HS_SERVER, | ||
104 | .send = tls13_server_hello_retry_send, | ||
105 | .recv = tls13_server_hello_retry_recv, | ||
106 | }, | ||
101 | [SERVER_ENCRYPTED_EXTENSIONS] = { | 107 | [SERVER_ENCRYPTED_EXTENSIONS] = { |
102 | .handshake_type = TLS13_MT_ENCRYPTED_EXTENSIONS, | 108 | .handshake_type = TLS13_MT_ENCRYPTED_EXTENSIONS, |
103 | .sender = TLS13_HS_SERVER, | 109 | .sender = TLS13_HS_SERVER, |
@@ -156,6 +162,7 @@ enum tls13_message_type handshakes[][TLS13_NUM_MESSAGE_TYPES] = { | |||
156 | CLIENT_HELLO, | 162 | CLIENT_HELLO, |
157 | SERVER_HELLO, | 163 | SERVER_HELLO, |
158 | CLIENT_HELLO_RETRY, | 164 | CLIENT_HELLO_RETRY, |
165 | SERVER_HELLO_RETRY, | ||
159 | SERVER_ENCRYPTED_EXTENSIONS, | 166 | SERVER_ENCRYPTED_EXTENSIONS, |
160 | SERVER_CERTIFICATE_REQUEST, | 167 | SERVER_CERTIFICATE_REQUEST, |
161 | SERVER_CERTIFICATE, | 168 | SERVER_CERTIFICATE, |
@@ -179,6 +186,7 @@ enum tls13_message_type handshakes[][TLS13_NUM_MESSAGE_TYPES] = { | |||
179 | CLIENT_HELLO, | 186 | CLIENT_HELLO, |
180 | SERVER_HELLO, | 187 | SERVER_HELLO, |
181 | CLIENT_HELLO_RETRY, | 188 | CLIENT_HELLO_RETRY, |
189 | SERVER_HELLO_RETRY, | ||
182 | SERVER_ENCRYPTED_EXTENSIONS, | 190 | SERVER_ENCRYPTED_EXTENSIONS, |
183 | SERVER_CERTIFICATE, | 191 | SERVER_CERTIFICATE, |
184 | SERVER_CERTIFICATE_VERIFY, | 192 | SERVER_CERTIFICATE_VERIFY, |
@@ -198,6 +206,7 @@ enum tls13_message_type handshakes[][TLS13_NUM_MESSAGE_TYPES] = { | |||
198 | CLIENT_HELLO, | 206 | CLIENT_HELLO, |
199 | SERVER_HELLO, | 207 | SERVER_HELLO, |
200 | CLIENT_HELLO_RETRY, | 208 | CLIENT_HELLO_RETRY, |
209 | SERVER_HELLO_RETRY, | ||
201 | SERVER_ENCRYPTED_EXTENSIONS, | 210 | SERVER_ENCRYPTED_EXTENSIONS, |
202 | SERVER_FINISHED, | 211 | SERVER_FINISHED, |
203 | CLIENT_FINISHED, | 212 | CLIENT_FINISHED, |
@@ -220,6 +229,7 @@ enum tls13_message_type handshakes[][TLS13_NUM_MESSAGE_TYPES] = { | |||
220 | CLIENT_HELLO, | 229 | CLIENT_HELLO, |
221 | SERVER_HELLO, | 230 | SERVER_HELLO, |
222 | CLIENT_HELLO_RETRY, | 231 | CLIENT_HELLO_RETRY, |
232 | SERVER_HELLO_RETRY, | ||
223 | SERVER_ENCRYPTED_EXTENSIONS, | 233 | SERVER_ENCRYPTED_EXTENSIONS, |
224 | SERVER_CERTIFICATE_REQUEST, | 234 | SERVER_CERTIFICATE_REQUEST, |
225 | SERVER_CERTIFICATE, | 235 | SERVER_CERTIFICATE, |
@@ -404,6 +414,12 @@ tls13_client_hello_retry_send(struct tls13_ctx *ctx) | |||
404 | } | 414 | } |
405 | 415 | ||
406 | int | 416 | int |
417 | tls13_server_hello_retry_recv(struct tls13_ctx *ctx) | ||
418 | { | ||
419 | return 0; | ||
420 | } | ||
421 | |||
422 | int | ||
407 | tls13_client_hello_retry_recv(struct tls13_ctx *ctx) | 423 | tls13_client_hello_retry_recv(struct tls13_ctx *ctx) |
408 | { | 424 | { |
409 | return 0; | 425 | return 0; |
@@ -473,6 +489,12 @@ tls13_server_hello_send(struct tls13_ctx *ctx) | |||
473 | } | 489 | } |
474 | 490 | ||
475 | int | 491 | int |
492 | tls13_server_hello_retry_send(struct tls13_ctx *ctx) | ||
493 | { | ||
494 | return 0; | ||
495 | } | ||
496 | |||
497 | int | ||
476 | tls13_server_encrypted_extensions_send(struct tls13_ctx *ctx) | 498 | tls13_server_encrypted_extensions_send(struct tls13_ctx *ctx) |
477 | { | 499 | { |
478 | return 0; | 500 | return 0; |
diff --git a/src/lib/libssl/tls13_handshake.h b/src/lib/libssl/tls13_handshake.h index cbbec744d3..9910dab106 100644 --- a/src/lib/libssl/tls13_handshake.h +++ b/src/lib/libssl/tls13_handshake.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: tls13_handshake.h,v 1.2 2019/01/20 22:36:19 tb Exp $ */ | 1 | /* $OpenBSD: tls13_handshake.h,v 1.3 2019/04/05 20:23:38 tb Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2019 Theo Buehler <tb@openbsd.org> | 3 | * Copyright (c) 2019 Theo Buehler <tb@openbsd.org> |
4 | * | 4 | * |
@@ -35,6 +35,7 @@ enum tls13_message_type { | |||
35 | CLIENT_HELLO, | 35 | CLIENT_HELLO, |
36 | SERVER_HELLO, | 36 | SERVER_HELLO, |
37 | CLIENT_HELLO_RETRY, | 37 | CLIENT_HELLO_RETRY, |
38 | SERVER_HELLO_RETRY, | ||
38 | SERVER_ENCRYPTED_EXTENSIONS, | 39 | SERVER_ENCRYPTED_EXTENSIONS, |
39 | SERVER_CERTIFICATE_REQUEST, | 40 | SERVER_CERTIFICATE_REQUEST, |
40 | SERVER_CERTIFICATE, | 41 | SERVER_CERTIFICATE, |
diff --git a/src/lib/libssl/tls13_internal.h b/src/lib/libssl/tls13_internal.h index c9ef37a39f..1d7a7eb699 100644 --- a/src/lib/libssl/tls13_internal.h +++ b/src/lib/libssl/tls13_internal.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: tls13_internal.h,v 1.27 2019/04/04 16:53:57 jsing Exp $ */ | 1 | /* $OpenBSD: tls13_internal.h,v 1.28 2019/04/05 20:23:38 tb Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2018 Bob Beck <beck@openbsd.org> | 3 | * Copyright (c) 2018 Bob Beck <beck@openbsd.org> |
4 | * Copyright (c) 2018 Theo Buehler <tb@openbsd.org> | 4 | * Copyright (c) 2018 Theo Buehler <tb@openbsd.org> |
@@ -229,6 +229,8 @@ int tls13_client_key_update_send(struct tls13_ctx *ctx); | |||
229 | int tls13_client_key_update_recv(struct tls13_ctx *ctx); | 229 | int tls13_client_key_update_recv(struct tls13_ctx *ctx); |
230 | int tls13_server_hello_recv(struct tls13_ctx *ctx); | 230 | int tls13_server_hello_recv(struct tls13_ctx *ctx); |
231 | int tls13_server_hello_send(struct tls13_ctx *ctx); | 231 | int tls13_server_hello_send(struct tls13_ctx *ctx); |
232 | int tls13_server_hello_retry_recv(struct tls13_ctx *ctx); | ||
233 | int tls13_server_hello_retry_send(struct tls13_ctx *ctx); | ||
232 | int tls13_server_encrypted_extensions_recv(struct tls13_ctx *ctx); | 234 | int tls13_server_encrypted_extensions_recv(struct tls13_ctx *ctx); |
233 | int tls13_server_encrypted_extensions_send(struct tls13_ctx *ctx); | 235 | int tls13_server_encrypted_extensions_send(struct tls13_ctx *ctx); |
234 | int tls13_server_certificate_recv(struct tls13_ctx *ctx); | 236 | int tls13_server_certificate_recv(struct tls13_ctx *ctx); |