diff options
Diffstat (limited to 'src/lib/libssl/tls13_handshake.c')
| -rw-r--r-- | src/lib/libssl/tls13_handshake.c | 27 |
1 files changed, 7 insertions, 20 deletions
diff --git a/src/lib/libssl/tls13_handshake.c b/src/lib/libssl/tls13_handshake.c index 78f5611b70..160202421c 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.17 2019/01/21 13:13:46 jsing Exp $ */ | 1 | /* $OpenBSD: tls13_handshake.c,v 1.18 2019/01/21 13:45:57 jsing 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> |
| @@ -31,11 +31,7 @@ | |||
| 31 | struct tls13_handshake_action { | 31 | struct tls13_handshake_action { |
| 32 | uint8_t record_type; | 32 | uint8_t record_type; |
| 33 | uint8_t handshake_type; | 33 | uint8_t handshake_type; |
| 34 | |||
| 35 | uint8_t sender; | 34 | uint8_t sender; |
| 36 | #define TLS13_HS_CLIENT 1 | ||
| 37 | #define TLS13_HS_SERVER 2 | ||
| 38 | |||
| 39 | uint8_t handshake_complete; | 35 | uint8_t handshake_complete; |
| 40 | 36 | ||
| 41 | int (*send)(struct tls13_ctx *ctx); | 37 | int (*send)(struct tls13_ctx *ctx); |
| @@ -44,7 +40,6 @@ struct tls13_handshake_action { | |||
| 44 | 40 | ||
| 45 | enum tls13_message_type tls13_handshake_active_state(struct tls13_ctx *ctx); | 41 | enum tls13_message_type tls13_handshake_active_state(struct tls13_ctx *ctx); |
| 46 | 42 | ||
| 47 | int tls13_connect(struct tls13_ctx *ctx); | ||
| 48 | int tls13_accept(struct tls13_ctx *ctx); | 43 | int tls13_accept(struct tls13_ctx *ctx); |
| 49 | 44 | ||
| 50 | struct tls13_handshake_action * | 45 | struct tls13_handshake_action * |
| @@ -313,14 +308,6 @@ tls13_handshake_perform(struct tls13_ctx *ctx) | |||
| 313 | } | 308 | } |
| 314 | 309 | ||
| 315 | int | 310 | int |
| 316 | tls13_connect(struct tls13_ctx *ctx) | ||
| 317 | { | ||
| 318 | ctx->mode = TLS13_HS_CLIENT; | ||
| 319 | |||
| 320 | return tls13_handshake_perform(ctx); | ||
| 321 | } | ||
| 322 | |||
| 323 | int | ||
| 324 | tls13_accept(struct tls13_ctx *ctx) | 311 | tls13_accept(struct tls13_ctx *ctx) |
| 325 | { | 312 | { |
| 326 | ctx->mode = TLS13_HS_SERVER; | 313 | ctx->mode = TLS13_HS_SERVER; |
| @@ -391,13 +378,13 @@ tls13_handshake_recv_action(struct tls13_ctx *ctx, | |||
| 391 | return TLS13_IO_FAILURE; | 378 | return TLS13_IO_FAILURE; |
| 392 | } | 379 | } |
| 393 | 380 | ||
| 394 | return action->recv(ctx); | 381 | /* XXX provide CBS and check all consumed. */ |
| 395 | } | 382 | ret = action->recv(ctx); |
| 396 | 383 | ||
| 397 | int | 384 | tls13_handshake_msg_free(ctx->hs_msg); |
| 398 | tls13_client_hello_send(struct tls13_ctx *ctx) | 385 | ctx->hs_msg = NULL; |
| 399 | { | 386 | |
| 400 | return 0; | 387 | return ret; |
| 401 | } | 388 | } |
| 402 | 389 | ||
| 403 | int | 390 | int |
