diff options
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libssl/tls13_lib.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/lib/libssl/tls13_lib.c b/src/lib/libssl/tls13_lib.c index d3e4050c1e..f096fe633e 100644 --- a/src/lib/libssl/tls13_lib.c +++ b/src/lib/libssl/tls13_lib.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: tls13_lib.c,v 1.41 2020/05/10 16:56:11 jsing Exp $ */ | 1 | /* $OpenBSD: tls13_lib.c,v 1.42 2020/05/11 17:28:33 jsing Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2018, 2019 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2018, 2019 Joel Sing <jsing@openbsd.org> |
| 4 | * Copyright (c) 2019 Bob Beck <beck@openbsd.org> | 4 | * Copyright (c) 2019 Bob Beck <beck@openbsd.org> |
| @@ -332,6 +332,14 @@ tls13_phh_received_cb(void *cb_arg, CBS *cbs) | |||
| 332 | return ret; | 332 | return ret; |
| 333 | } | 333 | } |
| 334 | 334 | ||
| 335 | static const struct tls13_record_layer_callbacks rl_callbacks = { | ||
| 336 | .wire_read = tls13_legacy_wire_read_cb, | ||
| 337 | .wire_write = tls13_legacy_wire_write_cb, | ||
| 338 | .alert_recv = tls13_alert_received_cb, | ||
| 339 | .phh_recv = tls13_phh_received_cb, | ||
| 340 | .phh_sent = tls13_phh_done_cb, | ||
| 341 | }; | ||
| 342 | |||
| 335 | struct tls13_ctx * | 343 | struct tls13_ctx * |
| 336 | tls13_ctx_new(int mode) | 344 | tls13_ctx_new(int mode) |
| 337 | { | 345 | { |
| @@ -342,9 +350,7 @@ tls13_ctx_new(int mode) | |||
| 342 | 350 | ||
| 343 | ctx->mode = mode; | 351 | ctx->mode = mode; |
| 344 | 352 | ||
| 345 | if ((ctx->rl = tls13_record_layer_new(tls13_legacy_wire_read_cb, | 353 | if ((ctx->rl = tls13_record_layer_new(&rl_callbacks, ctx)) == NULL) |
| 346 | tls13_legacy_wire_write_cb, tls13_alert_received_cb, | ||
| 347 | tls13_phh_received_cb, tls13_phh_done_cb, ctx)) == NULL) | ||
| 348 | goto err; | 354 | goto err; |
| 349 | 355 | ||
| 350 | ctx->handshake_message_sent_cb = tls13_legacy_handshake_message_sent_cb; | 356 | ctx->handshake_message_sent_cb = tls13_legacy_handshake_message_sent_cb; |
