boot: Add the support of MBEDTLS version 3.0.0

Signed-off-by: Sherry Zhang <sherry.zhang2@arm.com>
Change-Id: Idd7ce989fe259e9003732e80beaf3dccdedd3050
diff --git a/ext/fiat/src/curve25519.c b/ext/fiat/src/curve25519.c
index f669570..58abb08 100644
--- a/ext/fiat/src/curve25519.c
+++ b/ext/fiat/src/curve25519.c
@@ -36,6 +36,10 @@
 #if defined(MCUBOOT_USE_MBED_TLS)
 #include <mbedtls/platform_util.h>
 #include <mbedtls/sha512.h>
+#include <mbedtls/version.h>
+    #if MBEDTLS_VERSION_NUMBER >= 0x03000000
+        #include <mbedtls/compat-2.x.h>
+    #endif
 #else
 #include <tinycrypt/constants.h>
 #include <tinycrypt/utils.h>