diff options
Diffstat (limited to 'src/lib/libssl/tls13_legacy.c')
| -rw-r--r-- | src/lib/libssl/tls13_legacy.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/src/lib/libssl/tls13_legacy.c b/src/lib/libssl/tls13_legacy.c index 27e030fa77..545f2cd978 100644 --- a/src/lib/libssl/tls13_legacy.c +++ b/src/lib/libssl/tls13_legacy.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: tls13_legacy.c,v 1.37 2022/02/06 16:08:14 jsing Exp $ */ | 1 | /* $OpenBSD: tls13_legacy.c,v 1.38 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 | * | 4 | * |
| @@ -414,14 +414,10 @@ tls13_legacy_accept(SSL *ssl) | |||
| 414 | int ret; | 414 | int ret; |
| 415 | 415 | ||
| 416 | if (ctx == NULL) { | 416 | if (ctx == NULL) { |
| 417 | if ((ctx = tls13_ctx_new(TLS13_HS_SERVER)) == NULL) { | 417 | if ((ctx = tls13_ctx_new(TLS13_HS_SERVER, ssl)) == NULL) { |
| 418 | SSLerror(ssl, ERR_R_INTERNAL_ERROR); /* XXX */ | 418 | SSLerror(ssl, ERR_R_INTERNAL_ERROR); /* XXX */ |
| 419 | return -1; | 419 | return -1; |
| 420 | } | 420 | } |
| 421 | ssl->internal->tls13 = ctx; | ||
| 422 | ctx->ssl = ssl; | ||
| 423 | ctx->hs = &ssl->s3->hs; | ||
| 424 | |||
| 425 | if (!tls13_server_init(ctx)) { | 421 | if (!tls13_server_init(ctx)) { |
| 426 | if (ERR_peek_error() == 0) | 422 | if (ERR_peek_error() == 0) |
| 427 | SSLerror(ssl, ERR_R_INTERNAL_ERROR); /* XXX */ | 423 | SSLerror(ssl, ERR_R_INTERNAL_ERROR); /* XXX */ |
| @@ -450,14 +446,10 @@ tls13_legacy_connect(SSL *ssl) | |||
| 450 | int ret; | 446 | int ret; |
| 451 | 447 | ||
| 452 | if (ctx == NULL) { | 448 | if (ctx == NULL) { |
| 453 | if ((ctx = tls13_ctx_new(TLS13_HS_CLIENT)) == NULL) { | 449 | if ((ctx = tls13_ctx_new(TLS13_HS_CLIENT, ssl)) == NULL) { |
| 454 | SSLerror(ssl, ERR_R_INTERNAL_ERROR); /* XXX */ | 450 | SSLerror(ssl, ERR_R_INTERNAL_ERROR); /* XXX */ |
| 455 | return -1; | 451 | return -1; |
| 456 | } | 452 | } |
| 457 | ssl->internal->tls13 = ctx; | ||
| 458 | ctx->ssl = ssl; | ||
| 459 | ctx->hs = &ssl->s3->hs; | ||
| 460 | |||
| 461 | if (!tls13_client_init(ctx)) { | 453 | if (!tls13_client_init(ctx)) { |
| 462 | if (ERR_peek_error() == 0) | 454 | if (ERR_peek_error() == 0) |
| 463 | SSLerror(ssl, ERR_R_INTERNAL_ERROR); /* XXX */ | 455 | SSLerror(ssl, ERR_R_INTERNAL_ERROR); /* XXX */ |
