1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-29 11:41:15 +03:00

Remove MBEDTLS_ECJPAKE_ALT

Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
This commit is contained in:
Thomas Daubney
2024-06-05 14:56:29 +01:00
parent 5edad7f89f
commit e647d8f77a
4 changed files with 0 additions and 31 deletions

View File

@ -383,7 +383,6 @@
//#define MBEDTLS_CHACHAPOLY_ALT //#define MBEDTLS_CHACHAPOLY_ALT
//#define MBEDTLS_CMAC_ALT //#define MBEDTLS_CMAC_ALT
//#define MBEDTLS_DES_ALT //#define MBEDTLS_DES_ALT
//#define MBEDTLS_ECJPAKE_ALT
//#define MBEDTLS_GCM_ALT //#define MBEDTLS_GCM_ALT
//#define MBEDTLS_NIST_KW_ALT //#define MBEDTLS_NIST_KW_ALT
//#define MBEDTLS_MD5_ALT //#define MBEDTLS_MD5_ALT

View File

@ -20,8 +20,6 @@
#include <string.h> #include <string.h>
#if !defined(MBEDTLS_ECJPAKE_ALT)
/* /*
* Convert a mbedtls_ecjpake_role to identifier string * Convert a mbedtls_ecjpake_role to identifier string
*/ */
@ -820,8 +818,6 @@ cleanup:
#undef ID_MINE #undef ID_MINE
#undef ID_PEER #undef ID_PEER
#endif /* ! MBEDTLS_ECJPAKE_ALT */
#if defined(MBEDTLS_SELF_TEST) #if defined(MBEDTLS_SELF_TEST)
#include "mbedtls/platform.h" #include "mbedtls/platform.h"
@ -840,8 +836,6 @@ static const unsigned char ecjpake_test_password[] = {
0x65, 0x73, 0x74 0x65, 0x73, 0x74
}; };
#if !defined(MBEDTLS_ECJPAKE_ALT)
static const unsigned char ecjpake_test_x1[] = { static const unsigned char ecjpake_test_x1[] = {
0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c,
0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18,
@ -1016,8 +1010,6 @@ cleanup:
return ret; return ret;
} }
#endif /* ! MBEDTLS_ECJPAKE_ALT */
/* For tests we don't need a secure RNG; /* For tests we don't need a secure RNG;
* use the LGC from Numerical Recipes for simplicity */ * use the LGC from Numerical Recipes for simplicity */
static int ecjpake_lgc(void *p, unsigned char *out, size_t len) static int ecjpake_lgc(void *p, unsigned char *out, size_t len)
@ -1116,7 +1108,6 @@ int mbedtls_ecjpake_self_test(int verbose)
mbedtls_printf("passed\n"); mbedtls_printf("passed\n");
} }
#if !defined(MBEDTLS_ECJPAKE_ALT)
/* 'reference handshake' tests can only be run against implementations /* 'reference handshake' tests can only be run against implementations
* for which we have 100% control over how the random ephemeral keys * for which we have 100% control over how the random ephemeral keys
* are generated. This is only the case for the internal Mbed TLS * are generated. This is only the case for the internal Mbed TLS
@ -1186,7 +1177,6 @@ int mbedtls_ecjpake_self_test(int verbose)
if (verbose != 0) { if (verbose != 0) {
mbedtls_printf("passed\n"); mbedtls_printf("passed\n");
} }
#endif /* ! MBEDTLS_ECJPAKE_ALT */
cleanup: cleanup:
mbedtls_ecjpake_free(&cli); mbedtls_ecjpake_free(&cli);

View File

@ -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 */

View File

@ -45,7 +45,6 @@ typedef enum {
MBEDTLS_ECJPAKE_NONE, /**< Undefined */ MBEDTLS_ECJPAKE_NONE, /**< Undefined */
} mbedtls_ecjpake_role; } mbedtls_ecjpake_role;
#if !defined(MBEDTLS_ECJPAKE_ALT)
/** /**
* EC J-PAKE context structure. * EC J-PAKE context structure.
* *
@ -75,10 +74,6 @@ typedef struct mbedtls_ecjpake_context {
mbedtls_mpi MBEDTLS_PRIVATE(s); /**< Pre-shared secret (passphrase) */ mbedtls_mpi MBEDTLS_PRIVATE(s); /**< Pre-shared secret (passphrase) */
} mbedtls_ecjpake_context; } mbedtls_ecjpake_context;
#else /* MBEDTLS_ECJPAKE_ALT */
#include "ecjpake_alt.h"
#endif /* MBEDTLS_ECJPAKE_ALT */
/** /**
* \brief Initialize an ECJPAKE context. * \brief Initialize an ECJPAKE context.
* *