From ffd3a25f2822ad41040600e98da045f9f9ca96dd Mon Sep 17 00:00:00 2001 From: jsing <> Date: Mon, 29 Mar 2021 16:46:09 +0000 Subject: Move finished and peer finished to the handshake struct. This moves the finish_md and peer_finish_md from the 'tmp' struct to the handshake struct, renaming to finished and peer_finished in the process. This also allows the remaining S3I(s) references to be removed from the TLSv1.3 client and server. ok inoguchi@ tb@ --- src/lib/libssl/tls13_client.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'src/lib/libssl/tls13_client.c') diff --git a/src/lib/libssl/tls13_client.c b/src/lib/libssl/tls13_client.c index 78bf15ec59..e0febee926 100644 --- a/src/lib/libssl/tls13_client.c +++ b/src/lib/libssl/tls13_client.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tls13_client.c,v 1.76 2021/03/24 18:44:00 jsing Exp $ */ +/* $OpenBSD: tls13_client.c,v 1.77 2021/03/29 16:46:09 jsing Exp $ */ /* * Copyright (c) 2018, 2019 Joel Sing * @@ -746,7 +746,6 @@ tls13_server_finished_recv(struct tls13_ctx *ctx, CBS *cbs) uint8_t key[EVP_MAX_MD_SIZE]; HMAC_CTX *hmac_ctx = NULL; unsigned int hlen; - SSL *s = ctx->ssl; int ret = 0; /* @@ -781,9 +780,9 @@ tls13_server_finished_recv(struct tls13_ctx *ctx, CBS *cbs) goto err; } - if (!CBS_write_bytes(cbs, S3I(s)->tmp.peer_finish_md, - sizeof(S3I(s)->tmp.peer_finish_md), - &S3I(s)->tmp.peer_finish_md_len)) + if (!CBS_write_bytes(cbs, ctx->hs->peer_finished, + sizeof(ctx->hs->peer_finished), + &ctx->hs->peer_finished_len)) goto err; if (!CBS_skip(cbs, verify_data_len)) @@ -1032,7 +1031,6 @@ tls13_client_finished_send(struct tls13_ctx *ctx, CBB *cbb) unsigned int hlen; HMAC_CTX *hmac_ctx = NULL; CBS cbs; - SSL *s = ctx->ssl; int ret = 0; if (!tls13_secret_init(&finished_key, EVP_MD_size(ctx->hash))) @@ -1064,8 +1062,8 @@ tls13_client_finished_send(struct tls13_ctx *ctx, CBB *cbb) goto err; CBS_init(&cbs, verify_data, verify_data_len); - if (!CBS_write_bytes(&cbs, S3I(s)->tmp.finish_md, - sizeof(S3I(s)->tmp.finish_md), &S3I(s)->tmp.finish_md_len)) + if (!CBS_write_bytes(&cbs, ctx->hs->finished, + sizeof(ctx->hs->finished), &ctx->hs->finished_len)) goto err; ret = 1; -- cgit v1.2.3-55-g6feb