Remove MBEDTLS_ECJPAKE_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 25ef0ca..2c82ca3 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_ECJPAKE_ALT
//#define MBEDTLS_GCM_ALT
//#define MBEDTLS_NIST_KW_ALT
//#define MBEDTLS_MD5_ALT
diff --git a/library/ecjpake.c b/library/ecjpake.c
index cdf5d7e..628fb65 100644
--- a/library/ecjpake.c
+++ b/library/ecjpake.c
@@ -20,8 +20,6 @@
#include <string.h>
-#if !defined(MBEDTLS_ECJPAKE_ALT)
-
/*
* Convert a mbedtls_ecjpake_role to identifier string
*/
@@ -820,8 +818,6 @@
#undef ID_MINE
#undef ID_PEER
-#endif /* ! MBEDTLS_ECJPAKE_ALT */
-
#if defined(MBEDTLS_SELF_TEST)
#include "mbedtls/platform.h"
@@ -840,8 +836,6 @@
0x65, 0x73, 0x74
};
-#if !defined(MBEDTLS_ECJPAKE_ALT)
-
static const unsigned char ecjpake_test_x1[] = {
0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c,
0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18,
@@ -1016,8 +1010,6 @@
return ret;
}
-#endif /* ! MBEDTLS_ECJPAKE_ALT */
-
/* For tests we don't need a secure RNG;
* use the LGC from Numerical Recipes for simplicity */
static int ecjpake_lgc(void *p, unsigned char *out, size_t len)
@@ -1116,7 +1108,6 @@
mbedtls_printf("passed\n");
}
-#if !defined(MBEDTLS_ECJPAKE_ALT)
/* 'reference handshake' tests can only be run against implementations
* for which we have 100% control over how the random ephemeral keys
* are generated. This is only the case for the internal Mbed TLS
@@ -1186,7 +1177,6 @@
if (verbose != 0) {
mbedtls_printf("passed\n");
}
-#endif /* ! MBEDTLS_ECJPAKE_ALT */
cleanup:
mbedtls_ecjpake_free(&cli);
diff --git a/tests/include/alt-dummy/ecjpake_alt.h b/tests/include/alt-dummy/ecjpake_alt.h
deleted file mode 100644
index 4d75248..0000000
--- a/tests/include/alt-dummy/ecjpake_alt.h
+++ /dev/null
@@ -1,15 +0,0 @@
-/* ecjpake_alt.h with dummy types for MBEDTLS_ECJPAKE_ALT */
-/*
- * Copyright The Mbed TLS Contributors
- * SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
- */
-
-#ifndef ECJPAKE_ALT_H
-#define ECJPAKE_ALT_H
-
-typedef struct mbedtls_ecjpake_context {
- int dummy;
-} mbedtls_ecjpake_context;
-
-
-#endif /* ecjpake_alt.h */
diff --git a/tf-psa-crypto/drivers/builtin/include/mbedtls/ecjpake.h b/tf-psa-crypto/drivers/builtin/include/mbedtls/ecjpake.h
index c2148a2..a75a8ec 100644
--- a/tf-psa-crypto/drivers/builtin/include/mbedtls/ecjpake.h
+++ b/tf-psa-crypto/drivers/builtin/include/mbedtls/ecjpake.h
@@ -45,7 +45,6 @@
MBEDTLS_ECJPAKE_NONE, /**< Undefined */
} mbedtls_ecjpake_role;
-#if !defined(MBEDTLS_ECJPAKE_ALT)
/**
* EC J-PAKE context structure.
*
@@ -75,10 +74,6 @@
mbedtls_mpi MBEDTLS_PRIVATE(s); /**< Pre-shared secret (passphrase) */
} mbedtls_ecjpake_context;
-#else /* MBEDTLS_ECJPAKE_ALT */
-#include "ecjpake_alt.h"
-#endif /* MBEDTLS_ECJPAKE_ALT */
-
/**
* \brief Initialize an ECJPAKE context.
*