summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/libcrypto/kdf/tls1_prf.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/lib/libcrypto/kdf/tls1_prf.c b/src/lib/libcrypto/kdf/tls1_prf.c
index 970d77253b..1ba1e363f7 100644
--- a/src/lib/libcrypto/kdf/tls1_prf.c
+++ b/src/lib/libcrypto/kdf/tls1_prf.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: tls1_prf.c,v 1.28 2024/07/09 17:00:25 tb Exp $ */ 1/* $OpenBSD: tls1_prf.c,v 1.29 2024/07/09 17:00:59 tb Exp $ */
2/* 2/*
3 * Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL project 3 * Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL project
4 * 2016. 4 * 2016.
@@ -284,7 +284,7 @@ tls1_prf_P_hash(const EVP_MD *md,
284 goto err; 284 goto err;
285 285
286 for (;;) { 286 for (;;) {
287 /* Reinit mac contexts */ 287 /* Reinit mac contexts */
288 if (!EVP_MD_CTX_copy_ex(ctx, ctx_init)) 288 if (!EVP_MD_CTX_copy_ex(ctx, ctx_init))
289 goto err; 289 goto err;
290 if (!EVP_DigestSignUpdate(ctx, A1, A1_len)) 290 if (!EVP_DigestSignUpdate(ctx, A1, A1_len))
@@ -300,10 +300,9 @@ tls1_prf_P_hash(const EVP_MD *md,
300 goto err; 300 goto err;
301 out += mac_len; 301 out += mac_len;
302 out_len -= mac_len; 302 out_len -= mac_len;
303 /* calc the next A1 value */
304 if (!EVP_DigestSignFinal(ctx_tmp, A1, &A1_len)) 303 if (!EVP_DigestSignFinal(ctx_tmp, A1, &A1_len))
305 goto err; 304 goto err;
306 } else { /* last one */ 305 } else {
307 if (!EVP_DigestSignFinal(ctx, A1, &A1_len)) 306 if (!EVP_DigestSignFinal(ctx, A1, &A1_len))
308 goto err; 307 goto err;
309 memcpy(out, A1, out_len); 308 memcpy(out, A1, out_len);