Gilles Peskine 86eac795c9 Have MBEDTLS_TIMING_C require MBEDTLS_HAVE_TIME
Nowadays, the timing module just builds on a function that provides a timer
with millisecond resolution. In terms of platform requirements, this is
almost exactly equivalent to `mbedtls_ms_time()`
provides (`mbedtls_ms_time()` is arguably a little stronger because it is
supposed to last longer than a single timer object, but an application could
start a timer when it starts, so there's no real difference.) So it's a bit
silly that `timing.c` essentially reimplements this. Rely on
`mbedtls_ms_time()` instead.

This is an API break because in Mbed TLS 4.0, it was possible to enable
`MBEDTLS_TIMING_C` without `MBEDTLS_HAVE_TIME`. However, `timing.c` only
provided an implementation for Windows and Unix-like platforms, and on those
platforms, it is very likely that the default implementation of
`MBEDTLS_HAVE_TIME` would also work. (The main exception would be a platform
that has the traditional Unix function `gettimeofday()`, but not the 1990s
novelty `clock_gettime()`.) So make this an official requirement, as a
belated change that really should have gone into 4.0 if we'd taken the time
to dig into it.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2026-02-19 16:53:52 +01:00
..
private Remove support for static ECDH cipher suites 2025-09-11 13:22:40 +01:00
build_info.h Enable checks for bad options in the config file 2025-09-24 17:20:35 +02:00
debug.h library: debug: adjust guards for "mbedtls_debug_print_crt" 2026-01-08 10:32:57 +01:00
error.h Add comments for remaining internal includes 2025-12-02 12:35:20 +01:00
mbedtls_config.h Have MBEDTLS_TIMING_C require MBEDTLS_HAVE_TIME 2026-02-19 16:53:52 +01:00
net_sockets.h Unify generic errors to PSA errors 2025-08-18 14:46:39 +01:00
oid.h Add missing include 2025-07-26 00:07:50 +02:00
pkcs7.h Revert unification for some error codes 2025-08-28 17:39:10 +01:00
ssl_cache.h Header updates 2023-11-03 12:21:36 +00:00
ssl_ciphersuites.h ssl: rm useless private includes in public headers 2025-12-01 10:04:06 +01:00
ssl_cookie.h remove RNG parameters from SSL API's 2025-03-10 13:24:31 +00:00
ssl_ticket.h remove RNG parameters from SSL API's 2025-03-10 13:24:31 +00:00
ssl.h Merge pull request #10570 from valeriosetti/issue10349 2026-02-03 11:01:11 +00:00
timing.h Move back timing.c to mbedtls 2024-12-04 14:25:02 +01:00
version.h Simplify runtime version info string methods 2025-08-18 11:39:45 +02:00
x509_crl.h switch to mbedtls_pk_sigalg_t 2025-08-07 08:25:52 +01:00
x509_crt.h Replace references of mbedtls_ecp_set_max_ops with psa_interruptible_set_max_ops as it is now internal 2025-12-23 16:11:49 +00:00
x509_csr.h Unify generic errors to PSA errors 2025-08-18 14:46:39 +01:00
x509.h Add improvements to code comments and docs 2026-01-12 08:19:07 +00:00