summaryrefslogtreecommitdiff
path: root/src/lib/libssl/tls13_server.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libssl/tls13_server.c')
-rw-r--r--src/lib/libssl/tls13_server.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/lib/libssl/tls13_server.c b/src/lib/libssl/tls13_server.c
index bac9623a15..4fed1a43d0 100644
--- a/src/lib/libssl/tls13_server.c
+++ b/src/lib/libssl/tls13_server.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: tls13_server.c,v 1.73 2021/03/24 18:44:00 jsing Exp $ */ 1/* $OpenBSD: tls13_server.c,v 1.74 2021/03/29 16:46:09 jsing Exp $ */
2/* 2/*
3 * Copyright (c) 2019, 2020 Joel Sing <jsing@openbsd.org> 3 * Copyright (c) 2019, 2020 Joel Sing <jsing@openbsd.org>
4 * Copyright (c) 2020 Bob Beck <beck@openbsd.org> 4 * Copyright (c) 2020 Bob Beck <beck@openbsd.org>
@@ -783,7 +783,6 @@ tls13_server_finished_send(struct tls13_ctx *ctx, CBB *cbb)
783 unsigned int hlen; 783 unsigned int hlen;
784 HMAC_CTX *hmac_ctx = NULL; 784 HMAC_CTX *hmac_ctx = NULL;
785 CBS cbs; 785 CBS cbs;
786 SSL *s = ctx->ssl;
787 int ret = 0; 786 int ret = 0;
788 787
789 if (!tls13_secret_init(&finished_key, EVP_MD_size(ctx->hash))) 788 if (!tls13_secret_init(&finished_key, EVP_MD_size(ctx->hash)))
@@ -815,8 +814,8 @@ tls13_server_finished_send(struct tls13_ctx *ctx, CBB *cbb)
815 goto err; 814 goto err;
816 815
817 CBS_init(&cbs, verify_data, verify_data_len); 816 CBS_init(&cbs, verify_data, verify_data_len);
818 if (!CBS_write_bytes(&cbs, S3I(s)->tmp.finish_md, 817 if (!CBS_write_bytes(&cbs, ctx->hs->finished,
819 sizeof(S3I(s)->tmp.finish_md), &S3I(s)->tmp.finish_md_len)) 818 sizeof(ctx->hs->finished), &ctx->hs->finished_len))
820 goto err; 819 goto err;
821 820
822 ret = 1; 821 ret = 1;
@@ -1050,7 +1049,6 @@ tls13_client_finished_recv(struct tls13_ctx *ctx, CBS *cbs)
1050 uint8_t key[EVP_MAX_MD_SIZE]; 1049 uint8_t key[EVP_MAX_MD_SIZE];
1051 HMAC_CTX *hmac_ctx = NULL; 1050 HMAC_CTX *hmac_ctx = NULL;
1052 unsigned int hlen; 1051 unsigned int hlen;
1053 SSL *s = ctx->ssl;
1054 int ret = 0; 1052 int ret = 0;
1055 1053
1056 /* 1054 /*
@@ -1085,9 +1083,9 @@ tls13_client_finished_recv(struct tls13_ctx *ctx, CBS *cbs)
1085 goto err; 1083 goto err;
1086 } 1084 }
1087 1085
1088 if (!CBS_write_bytes(cbs, S3I(s)->tmp.peer_finish_md, 1086 if (!CBS_write_bytes(cbs, ctx->hs->peer_finished,
1089 sizeof(S3I(s)->tmp.peer_finish_md), 1087 sizeof(ctx->hs->peer_finished),
1090 &S3I(s)->tmp.peer_finish_md_len)) 1088 &ctx->hs->peer_finished_len))
1091 goto err; 1089 goto err;
1092 1090
1093 if (!CBS_skip(cbs, verify_data_len)) 1091 if (!CBS_skip(cbs, verify_data_len))