summaryrefslogtreecommitdiff
path: root/src/lib/libssl/tls13_lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libssl/tls13_lib.c')
-rw-r--r--src/lib/libssl/tls13_lib.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/lib/libssl/tls13_lib.c b/src/lib/libssl/tls13_lib.c
index 20d3a38412..8b8ea7f01b 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.63 2022/02/05 14:54:10 jsing Exp $ */ 1/* $OpenBSD: tls13_lib.c,v 1.64 2022/07/17 15:49:20 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>
@@ -382,14 +382,16 @@ static const struct tls13_record_layer_callbacks rl_callbacks = {
382}; 382};
383 383
384struct tls13_ctx * 384struct tls13_ctx *
385tls13_ctx_new(int mode) 385tls13_ctx_new(int mode, SSL *ssl)
386{ 386{
387 struct tls13_ctx *ctx = NULL; 387 struct tls13_ctx *ctx = NULL;
388 388
389 if ((ctx = calloc(sizeof(struct tls13_ctx), 1)) == NULL) 389 if ((ctx = calloc(sizeof(struct tls13_ctx), 1)) == NULL)
390 goto err; 390 goto err;
391 391
392 ctx->hs = &ssl->s3->hs;
392 ctx->mode = mode; 393 ctx->mode = mode;
394 ctx->ssl = ssl;
393 395
394 if ((ctx->rl = tls13_record_layer_new(&rl_callbacks, ctx)) == NULL) 396 if ((ctx->rl = tls13_record_layer_new(&rl_callbacks, ctx)) == NULL)
395 goto err; 397 goto err;
@@ -401,6 +403,8 @@ tls13_ctx_new(int mode)
401 403
402 ctx->middlebox_compat = 1; 404 ctx->middlebox_compat = 1;
403 405
406 ssl->internal->tls13 = ctx;
407
404 return ctx; 408 return ctx;
405 409
406 err: 410 err: