Remove MBEDTLS_DHM_ALT

Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
diff --git a/include/mbedtls/mbedtls_config.h b/include/mbedtls/mbedtls_config.h
index 2d1c9c1..25ef0ca 100644
--- a/include/mbedtls/mbedtls_config.h
+++ b/include/mbedtls/mbedtls_config.h
@@ -383,7 +383,6 @@
 //#define MBEDTLS_CHACHAPOLY_ALT
 //#define MBEDTLS_CMAC_ALT
 //#define MBEDTLS_DES_ALT
-//#define MBEDTLS_DHM_ALT
 //#define MBEDTLS_ECJPAKE_ALT
 //#define MBEDTLS_GCM_ALT
 //#define MBEDTLS_NIST_KW_ALT
diff --git a/library/dhm.c b/library/dhm.c
index bcc07f5..75af8b7 100644
--- a/library/dhm.c
+++ b/library/dhm.c
@@ -33,8 +33,6 @@
 
 #include "mbedtls/platform.h"
 
-#if !defined(MBEDTLS_DHM_ALT)
-
 /*
  * helper to validate the mbedtls_mpi size and import it
  */
@@ -642,7 +640,6 @@
 }
 #endif /* MBEDTLS_FS_IO */
 #endif /* MBEDTLS_ASN1_PARSE_C */
-#endif /* MBEDTLS_DHM_ALT */
 
 #if defined(MBEDTLS_SELF_TEST)
 
diff --git a/tests/include/alt-dummy/dhm_alt.h b/tests/include/alt-dummy/dhm_alt.h
deleted file mode 100644
index 3cb51d2..0000000
--- a/tests/include/alt-dummy/dhm_alt.h
+++ /dev/null
@@ -1,16 +0,0 @@
-/* dhm_alt.h with dummy types for MBEDTLS_DHM_ALT */
-/*
- *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
- */
-
-#ifndef DHM_ALT_H
-#define DHM_ALT_H
-
-typedef struct mbedtls_dhm_context {
-    int dummy;
-}
-mbedtls_dhm_context;
-
-
-#endif /* dhm_alt.h */
diff --git a/tests/scripts/all.sh b/tests/scripts/all.sh
index de74f97..6b439aa 100755
--- a/tests/scripts/all.sh
+++ b/tests/scripts/all.sh
@@ -2451,24 +2451,12 @@
     # Enable all MBEDTLS_XXX_ALT for whole modules. Do not enable
     # MBEDTLS_XXX_YYY_ALT which are for single functions.
     scripts/config.py set-all 'MBEDTLS_([A-Z0-9]*|NIST_KW)_ALT'
-    scripts/config.py unset MBEDTLS_DHM_ALT #incompatible with MBEDTLS_DEBUG_C
 
     # We can only compile, not link, since we don't have any implementations
     # suitable for testing with the dummy alt headers.
     make CFLAGS='-Werror -Wall -Wextra -I../tests/include/alt-dummy' lib
 }
 
-component_build_dhm_alt () {
-    msg "build: MBEDTLS_DHM_ALT" # ~30s
-    scripts/config.py full
-    scripts/config.py set MBEDTLS_DHM_ALT
-    # debug.c currently references mbedtls_dhm_context fields directly.
-    scripts/config.py unset MBEDTLS_DEBUG_C
-    # We can only compile, not link, since we don't have any implementations
-    # suitable for testing with the dummy alt headers.
-    make CFLAGS='-Werror -Wall -Wextra -I../tests/include/alt-dummy' lib
-}
-
 component_test_no_psa_crypto_full_cmake_asan() {
     # full minus MBEDTLS_PSA_CRYPTO_C: run the same set of tests as basic-build-test.sh
     msg "build: cmake, full config minus PSA crypto, ASan"
diff --git a/tf-psa-crypto/drivers/builtin/include/mbedtls/dhm.h b/tf-psa-crypto/drivers/builtin/include/mbedtls/dhm.h
index fcba3d2..0143405 100644
--- a/tf-psa-crypto/drivers/builtin/include/mbedtls/dhm.h
+++ b/tf-psa-crypto/drivers/builtin/include/mbedtls/dhm.h
@@ -93,8 +93,6 @@
 extern "C" {
 #endif
 
-#if !defined(MBEDTLS_DHM_ALT)
-
 /**
  * \brief          The DHM context structure.
  */
@@ -112,10 +110,6 @@
 }
 mbedtls_dhm_context;
 
-#else /* MBEDTLS_DHM_ALT */
-#include "dhm_alt.h"
-#endif /* MBEDTLS_DHM_ALT */
-
 /**
  * \brief          This function initializes the DHM context.
  *