mirror of
https://github.com/espressif/esp-idf.git
synced 2025-10-28 12:10:45 +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:
@@ -29,6 +29,7 @@
|
||||
#include <sys/time.h>
|
||||
#include "esp_system.h"
|
||||
#include "utils/common.h"
|
||||
#include "mbedtls/platform_util.h"
|
||||
|
||||
int os_get_time(struct os_time *t)
|
||||
{
|
||||
@@ -59,3 +60,10 @@ void os_sleep(os_time_t sec, os_time_t usec)
|
||||
usleep(usec);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef USE_MBEDTLS_CRYPTO
|
||||
void forced_memzero(void *ptr, size_t len)
|
||||
{
|
||||
mbedtls_platform_zeroize(ptr, len);
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user