diff options
Diffstat (limited to 'src/lib/libssl/tls13_server.c')
-rw-r--r-- | src/lib/libssl/tls13_server.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/libssl/tls13_server.c b/src/lib/libssl/tls13_server.c index 549383e331..9e5664b79a 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.65 2021/01/05 17:14:46 jsing Exp $ */ | 1 | /* $OpenBSD: tls13_server.c,v 1.66 2021/01/05 17:32:39 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> |
@@ -775,7 +775,7 @@ tls13_server_finished_send(struct tls13_ctx *ctx, CBB *cbb) | |||
775 | size_t transcript_hash_len; | 775 | size_t transcript_hash_len; |
776 | uint8_t key[EVP_MAX_MD_SIZE]; | 776 | uint8_t key[EVP_MAX_MD_SIZE]; |
777 | uint8_t *verify_data; | 777 | uint8_t *verify_data; |
778 | size_t hmac_len; | 778 | size_t verify_data_len; |
779 | unsigned int hlen; | 779 | unsigned int hlen; |
780 | HMAC_CTX *hmac_ctx = NULL; | 780 | HMAC_CTX *hmac_ctx = NULL; |
781 | CBS cbs; | 781 | CBS cbs; |
@@ -802,15 +802,15 @@ tls13_server_finished_send(struct tls13_ctx *ctx, CBB *cbb) | |||
802 | if (!HMAC_Update(hmac_ctx, transcript_hash, transcript_hash_len)) | 802 | if (!HMAC_Update(hmac_ctx, transcript_hash, transcript_hash_len)) |
803 | goto err; | 803 | goto err; |
804 | 804 | ||
805 | hmac_len = HMAC_size(hmac_ctx); | 805 | verify_data_len = HMAC_size(hmac_ctx); |
806 | if (!CBB_add_space(cbb, &verify_data, hmac_len)) | 806 | if (!CBB_add_space(cbb, &verify_data, verify_data_len)) |
807 | goto err; | 807 | goto err; |
808 | if (!HMAC_Final(hmac_ctx, verify_data, &hlen)) | 808 | if (!HMAC_Final(hmac_ctx, verify_data, &hlen)) |
809 | goto err; | 809 | goto err; |
810 | if (hlen != hmac_len) | 810 | if (hlen != verify_data_len) |
811 | goto err; | 811 | goto err; |
812 | 812 | ||
813 | CBS_init(&cbs, verify_data, hmac_len); | 813 | CBS_init(&cbs, verify_data, verify_data_len); |
814 | if (!CBS_write_bytes(&cbs, S3I(s)->tmp.finish_md, | 814 | if (!CBS_write_bytes(&cbs, S3I(s)->tmp.finish_md, |
815 | sizeof(S3I(s)->tmp.finish_md), &S3I(s)->tmp.finish_md_len)) | 815 | sizeof(S3I(s)->tmp.finish_md), &S3I(s)->tmp.finish_md_len)) |
816 | goto err; | 816 | goto err; |