summaryrefslogtreecommitdiffstats
path: root/lib/libssl/tls13_server.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libssl/tls13_server.c')
-rw-r--r--lib/libssl/tls13_server.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/lib/libssl/tls13_server.c b/lib/libssl/tls13_server.c
index a3adf9e6b3a..1c8644ab27a 100644
--- a/lib/libssl/tls13_server.c
+++ b/lib/libssl/tls13_server.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tls13_server.c,v 1.63 2020/11/17 07:02:30 tb Exp $ */
+/* $OpenBSD: tls13_server.c,v 1.64 2020/12/14 15:26:36 tb Exp $ */
/*
* Copyright (c) 2019, 2020 Joel Sing <jsing@openbsd.org>
* Copyright (c) 2020 Bob Beck <beck@openbsd.org>
@@ -776,6 +776,8 @@ tls13_server_finished_send(struct tls13_ctx *ctx, CBB *cbb)
size_t hmac_len;
unsigned int hlen;
HMAC_CTX *hmac_ctx = NULL;
+ CBS cbs;
+ SSL *s = ctx->ssl;
int ret = 0;
finished_key.data = key;
@@ -806,6 +808,11 @@ tls13_server_finished_send(struct tls13_ctx *ctx, CBB *cbb)
if (hlen != hmac_len)
goto err;
+ CBS_init(&cbs, verify_data, hmac_len);
+ if (!CBS_write_bytes(&cbs, S3I(s)->tmp.finish_md,
+ sizeof(S3I(s)->tmp.finish_md), &S3I(s)->tmp.finish_md_len))
+ goto err;
+
ret = 1;
err:
@@ -1036,6 +1043,7 @@ tls13_client_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;
/*
@@ -1070,6 +1078,11 @@ tls13_client_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))
+ goto err;
+
if (!CBS_skip(cbs, verify_data_len))
goto err;