Rename uint->bool operators to reflect input types
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
diff --git a/library/constant_time.c b/library/constant_time.c
index d4bd331..20e215a 100644
--- a/library/constant_time.c
+++ b/library/constant_time.c
@@ -131,7 +131,7 @@
{
volatile unsigned char *buf = start;
for (size_t i = 0; i < total; i++) {
- mbedtls_ct_condition_t no_op = mbedtls_ct_bool_gt(total - offset, i);
+ mbedtls_ct_condition_t no_op = mbedtls_ct_uint_gt(total - offset, i);
/* The first `total - offset` passes are a no-op. The last
* `offset` passes shift the data one byte to the left and
* zero out the last byte. */
@@ -188,7 +188,7 @@
size_t offsetval;
for (offsetval = offset_min; offsetval <= offset_max; offsetval++) {
- mbedtls_ct_memcpy_if(mbedtls_ct_bool_eq(offsetval, offset), dest, src + offsetval, NULL,
+ mbedtls_ct_memcpy_if(mbedtls_ct_uint_eq(offsetval, offset), dest, src + offsetval, NULL,
len);
}
}