x509_crt: Add initialization to time now

When creating time `now`, it is not initialized. This leads to an error
when building the project using -WError.
This patch fixes this issue

Signed-off-by: Andrea Calabrese <andrea.calabrese@amarulasolutions.com>
This commit is contained in:
Andrea Calabrese 2026-07-13 12:09:39 +02:00
parent 068ff080b3
commit 24213f87b8

View File

@ -2530,7 +2530,7 @@ static int x509_crt_verify_chain(
int signature_is_good;
unsigned self_cnt;
mbedtls_x509_crt *cur_trust_ca = NULL;
mbedtls_x509_time now;
mbedtls_x509_time now = {};
#if defined(MBEDTLS_HAVE_TIME_DATE)
if (mbedtls_x509_time_gmtime(mbedtls_time(NULL), &now) != 0) {