mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-26 02:02:02 +00:00
wpa_supplicant: Write Crypto API based on mbedtls
This commit add following crypto changes 1. Update current crypto code with upstream supplicant code 2. Add a proper porting layer to use mbedtls APIs for all the crypto operations used by supplicant. Internal crypto will be used when USE_MBEDLTS flag is disabled in supplicant's menuconfig. This commit also removes the clutter in crypto files due to partial porting of some APIs to mbedtls, all the code from those files have been removed and rewritten in a generic way, this is inspired from current upstream code. This also reduces the lib size significantly, supplicant's lib size reduces around ~567kb after this change(NB: lib size doesn't indicate reduction in final bin size).
This commit is contained in:
@@ -441,6 +441,9 @@ struct wpa_freq_range_list {
|
||||
};
|
||||
|
||||
#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
|
||||
#ifndef TEST_FAIL
|
||||
#define TEST_FAIL() 0
|
||||
#endif
|
||||
|
||||
void wpa_bin_clear_free(void *bin, size_t len);
|
||||
int int_array_len(const int *a);
|
||||
|
@@ -21,6 +21,10 @@
|
||||
|
||||
#include "supplicant_opt.h"
|
||||
|
||||
#define AES_SMALL_TABLES
|
||||
#define CONFIG_NO_RANDOM_POOL
|
||||
#define CONFIG_INTERNAL_LIBTOMMATH
|
||||
|
||||
/* Include possible build time configuration before including anything else */
|
||||
#ifndef __ets__
|
||||
#include <stdlib.h>
|
||||
|
Reference in New Issue
Block a user