From 48fb8a34485a659179655743356f7afcb65b45e6 Mon Sep 17 00:00:00 2001
From: Dave Rodgman <dave.rodgman@arm.com>
Date: Thu, 10 Aug 2023 14:01:51 +0100
Subject: [PATCH] Fix some renames that were missed

Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
---
 library/constant_time_internal.h | 6 +++---
 library/ssl_msg.c                | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/library/constant_time_internal.h b/library/constant_time_internal.h
index 647b664e8..dabf720aa 100644
--- a/library/constant_time_internal.h
+++ b/library/constant_time_internal.h
@@ -44,10 +44,10 @@
  *   example: bool x = y == z         =>    x = mbedtls_ct_uint_eq(y, z)
  *
  * - conditional data selection
- *   These are all named mbedtls_ct_<type>_if and mbedtls_ct_<type>_if0
+ *   These are all named mbedtls_ct_<type>_if and mbedtls_ct_<type>_if_else_0
  *   All arguments are considered secret.
  *   example: size_t a = x ? b : c    =>    a = mbedtls_ct_size_if(x, b, c)
- *   example: unsigned a = x ? b : 0  =>    a = mbedtls_ct_uint_if0(x, b)
+ *   example: unsigned a = x ? b : 0  =>    a = mbedtls_ct_uint__if_else_0(x, b)
  *
  * - block memory operations
  *   Only some arguments are considered secret, as documented for each
@@ -201,7 +201,7 @@ static inline mbedtls_ct_condition_t mbedtls_ct_uint_le(mbedtls_ct_uint_t x,
  * \param x     The first value to analyze.
  * \param y     The second value to analyze.
  *
- * \note        This is more efficient than mbedtls_ct_bool_ne if both arguments are
+ * \note        This is more efficient than mbedtls_ct_uint_ne if both arguments are
  *              mbedtls_ct_condition_t.
  *
  * \return      MBEDTLS_CT_TRUE if \p x ^ \p y,
diff --git a/library/ssl_msg.c b/library/ssl_msg.c
index 1a9c17e29..c8ffc1ede 100644
--- a/library/ssl_msg.c
+++ b/library/ssl_msg.c
@@ -154,7 +154,7 @@ int mbedtls_ct_hmac(mbedtls_svc_key_id_t key,
         PSA_CHK(psa_hash_finish(&aux_operation, aux_out,
                                 PSA_HASH_MAX_SIZE, &hash_length));
         /* Keep only the correct inner_hash in the output buffer */
-        mbedtls_ct_memcpy_if(mbedtls_ct_bool_eq(offset, data_len_secret),
+        mbedtls_ct_memcpy_if(mbedtls_ct_uint_eq(offset, data_len_secret),
                              output, aux_out, NULL, hash_size);
 
         if (offset < max_data_len) {