Merge branch 'cleanup/make_supp_headers_private_v4.0' into 'release/v4.0'

wpa_supplicant: Make internal crypto headers private (backport v4.0)

See merge request espressif/esp-idf!6061
This commit is contained in:
Jiang Jiang Jian 2019-09-23 18:00:43 +08:00
commit 7f9626d378
48 changed files with 66 additions and 84 deletions

View File

@ -38,11 +38,6 @@
#include "esp_private/wifi_os_adapter.h" #include "esp_private/wifi_os_adapter.h"
#include "esp_private/wifi.h" #include "esp_private/wifi.h"
#include "esp_phy_init.h" #include "esp_phy_init.h"
#include "crypto/md5.h"
#include "crypto/sha1.h"
#include "crypto/crypto.h"
#include "crypto/aes.h"
#include "crypto/dh_group5.h"
#include "driver/periph_ctrl.h" #include "driver/periph_ctrl.h"
#include "nvs.h" #include "nvs.h"
#include "os.h" #include "os.h"

View File

@ -5,7 +5,6 @@ if(NOT CONFIG_ESP32_NO_BLOBS)
endif() endif()
idf_component_register(SRCS "src/coexist.c" idf_component_register(SRCS "src/coexist.c"
"src/crypto_ops.c"
"src/lib_printf.c" "src/lib_printf.c"
"src/mesh_event.c" "src/mesh_event.c"
"src/phy_init.c" "src/phy_init.c"

View File

@ -12,6 +12,7 @@ set(srcs "port/os_xtensa.c"
"src/crypto/aes-wrap.c" "src/crypto/aes-wrap.c"
"src/crypto/bignum.c" "src/crypto/bignum.c"
"src/crypto/crypto_mbedtls.c" "src/crypto/crypto_mbedtls.c"
"src/crypto/crypto_ops.c"
"src/crypto/crypto_internal-cipher.c" "src/crypto/crypto_internal-cipher.c"
"src/crypto/crypto_internal-modexp.c" "src/crypto/crypto_internal-modexp.c"
"src/crypto/crypto_internal-rsa.c" "src/crypto/crypto_internal-rsa.c"

View File

@ -1,10 +0,0 @@
#ifndef WEPKEY_H
#define WEPKEY_H
#define WEPKEY_64_BYTES 5
#define WePKEY_128_BYTES 13
unsigned int wepkey_64(uint8_t *out, unsigned int size, const char *in, int n);
unsigned int wepkey_128(uint8_t *out, unsigned int size, const char *in, int n);
#endif /* WEPKEY_H */

View File

@ -40,7 +40,10 @@ extern "C" {
/** @addtogroup WPA_APIs /** @addtogroup WPA_APIs
* @{ * @{
*/ */
/* Crypto callback functions */
const wpa_crypto_funcs_t g_wifi_default_wpa_crypto_funcs;
/* Mesh crypto callback functions */
const mesh_crypto_funcs_t g_wifi_default_mesh_crypto_funcs;
/** /**
* @brief Supplicant initialization * @brief Supplicant initialization

View File

@ -10,7 +10,6 @@
#include "utils/common.h" #include "utils/common.h"
#include "crypto/crypto.h" #include "crypto/crypto.h"
#include "crypto/random.h"
#include "common/ieee802_11_defs.h" #include "common/ieee802_11_defs.h"
#include "hostapd.h" #include "hostapd.h"
#include "ap/sta_info.h" #include "ap/sta_info.h"

View File

@ -31,8 +31,8 @@
#include "utils/includes.h" #include "utils/includes.h"
#include "utils/common.h" #include "utils/common.h"
#include "crypto/aes.h" #include "aes.h"
#include "crypto/aes_wrap.h" #include "aes_wrap.h"
#ifdef USE_MBEDTLS_CRYPTO #ifdef USE_MBEDTLS_CRYPTO
#include "mbedtls/aes.h" #include "mbedtls/aes.h"

View File

@ -24,8 +24,8 @@
#include "utils/includes.h" #include "utils/includes.h"
#include "utils/common.h" #include "utils/common.h"
#include "crypto/crypto.h" #include "crypto.h"
#include "crypto/aes_i.h" #include "aes_i.h"

View File

@ -23,8 +23,8 @@
#include "utils/includes.h" #include "utils/includes.h"
#include "utils/common.h" #include "utils/common.h"
#include "crypto/crypto.h" #include "crypto.h"
#include "crypto/aes_i.h" #include "aes_i.h"
#include "os.h" #include "os.h"

View File

@ -24,8 +24,8 @@
#include "utils/includes.h" #include "utils/includes.h"
#include "utils/common.h" #include "utils/common.h"
#include "crypto/crypto.h" #include "crypto.h"
#include "crypto/aes_i.h" #include "aes_i.h"
/* /*
* rijndael-alg-fst.c * rijndael-alg-fst.c

View File

@ -34,8 +34,8 @@
#ifdef USE_MBEDTLS_CRYPTO #ifdef USE_MBEDTLS_CRYPTO
#include "mbedtls/aes.h" #include "mbedtls/aes.h"
#else /* USE_MBEDTLS_CRYPTO */ #else /* USE_MBEDTLS_CRYPTO */
#include "crypto/aes.h" #include "aes.h"
#include "crypto/aes_wrap.h" #include "aes_wrap.h"
#endif /* USE_MBEDTLS_CRYPTO */ #endif /* USE_MBEDTLS_CRYPTO */
/** /**

View File

@ -25,8 +25,8 @@
#include "utils/includes.h" #include "utils/includes.h"
#include "utils/common.h" #include "utils/common.h"
#include "crypto/aes.h" #include "aes.h"
#include "crypto/aes_wrap.h" #include "aes_wrap.h"
#ifdef USE_MBEDTLS_CRYPTO #ifdef USE_MBEDTLS_CRYPTO
#include "mbedtls/aes.h" #include "mbedtls/aes.h"
#endif /* USE_MBEDTLS_CRYPTO */ #endif /* USE_MBEDTLS_CRYPTO */

View File

@ -15,7 +15,7 @@
#ifndef AES_I_H #ifndef AES_I_H
#define AES_I_H #define AES_I_H
#include "crypto/aes.h" #include "aes.h"
/* #define FULL_UNROLL */ /* #define FULL_UNROLL */
#define AES_SMALL_TABLES #define AES_SMALL_TABLES

View File

@ -23,10 +23,10 @@
#include "utils/common.h" #include "utils/common.h"
#include "utils/includes.h" #include "utils/includes.h"
#include "crypto/crypto.h" #include "crypto.h"
#include "crypto/aes.h" #include "aes.h"
#if defined(CONFIG_DES) || defined(CONFIG_DES3) #if defined(CONFIG_DES) || defined(CONFIG_DES3)
#include "crypto/des_i.h" #include "des_i.h"
#endif #endif
#ifdef USE_MBEDTLS_CRYPTO #ifdef USE_MBEDTLS_CRYPTO
#include "mbedtls/aes.h" #include "mbedtls/aes.h"

View File

@ -35,7 +35,7 @@
#else /* USE_MBEDTLS_CRYPTO */ #else /* USE_MBEDTLS_CRYPTO */
#include "bignum.h" #include "bignum.h"
#endif /* USE_MBEDTLS_CRYPTO */ #endif /* USE_MBEDTLS_CRYPTO */
#include "crypto/crypto.h" #include "crypto.h"
#ifdef USE_MBEDTLS_CRYPTO #ifdef USE_MBEDTLS_CRYPTO
int int

View File

@ -7,7 +7,7 @@
*/ */
#include "utils/common.h" #include "utils/common.h"
#include "crypto/crypto.h" #include "crypto.h"
#include "utils/includes.h" #include "utils/includes.h"
#include "utils/common.h" #include "utils/common.h"

View File

@ -23,9 +23,9 @@
#include "utils/includes.h" #include "utils/includes.h"
#include "utils/common.h" #include "utils/common.h"
#include "crypto/crypto.h" #include "crypto.h"
#include "crypto/sha1_i.h" #include "sha1_i.h"
#include "crypto/md5_i.h" #include "md5_i.h"
#ifdef USE_MBEDTLS_CRYPTO #ifdef USE_MBEDTLS_CRYPTO
#include "mbedtls/sha256.h" #include "mbedtls/sha256.h"
#endif #endif

View File

@ -19,7 +19,7 @@
#include "utils/includes.h" #include "utils/includes.h"
#include "utils/common.h" #include "utils/common.h"
#include "crypto/crypto.h" #include "crypto.h"
#include "mbedtls/ecp.h" #include "mbedtls/ecp.h"
#include "mbedtls/entropy.h" #include "mbedtls/entropy.h"

View File

@ -13,14 +13,14 @@
// limitations under the License. // limitations under the License.
#include "utils/common.h" #include "utils/common.h"
#include "crypto/aes_wrap.h" #include "aes_wrap.h"
#include "crypto/sha256.h" #include "sha256.h"
#include "crypto/crypto.h" #include "crypto.h"
#include "crypto/md5.h" #include "md5.h"
#include "crypto/sha1.h" #include "sha1.h"
#include "crypto/aes.h" #include "aes.h"
#include "crypto/dh_group5.h" #include "esp_wpa.h"
#include "esp_wifi_crypto_types.h"
/* /*
* This structure is used to set the cyrpto callback function for station to connect when in security mode. * This structure is used to set the cyrpto callback function for station to connect when in security mode.
* These functions either call MbedTLS API's if USE_MBEDTLS_CRYPTO flag is set through Kconfig, or native * These functions either call MbedTLS API's if USE_MBEDTLS_CRYPTO flag is set through Kconfig, or native

View File

@ -12,7 +12,7 @@
#include "utils/includes.h" #include "utils/includes.h"
#include "utils/common.h" #include "utils/common.h"
#include "crypto/crypto.h" #include "crypto.h"
//#include "des_i.h" //#include "des_i.h"
/* /*

View File

@ -15,8 +15,8 @@
#include "utils/includes.h" #include "utils/includes.h"
#include "utils/common.h" #include "utils/common.h"
#include "crypto/dh_groups.h" #include "dh_groups.h"
#include "crypto/dh_group5.h" #include "dh_group5.h"
void * void *

View File

@ -15,9 +15,9 @@
#include "utils/includes.h" #include "utils/includes.h"
#include "utils/common.h" #include "utils/common.h"
#include "crypto/crypto.h" #include "crypto.h"
#include "crypto/random.h" #include "random.h"
#include "crypto/dh_groups.h" #include "dh_groups.h"
#include "utils/wpabuf.h" #include "utils/wpabuf.h"
#include "utils/wpa_debug.h" #include "utils/wpa_debug.h"
#include "esp_wifi_crypto_types.h" #include "esp_wifi_crypto_types.h"

View File

@ -6,7 +6,7 @@
#include "utils/includes.h" #include "utils/includes.h"
#include "utils/common.h" #include "utils/common.h"
#include "crypto/crypto.h" #include "crypto.h"
#define MD4_BLOCK_LENGTH 64 #define MD4_BLOCK_LENGTH 64
#define MD4_DIGEST_LENGTH 16 #define MD4_DIGEST_LENGTH 16

View File

@ -15,9 +15,9 @@
#include "utils/includes.h" #include "utils/includes.h"
#include "utils/common.h" #include "utils/common.h"
#include "crypto/md5.h" #include "md5.h"
#include "crypto/md5_i.h" #include "md5_i.h"
#include "crypto/crypto.h" #include "crypto.h"
static void MD5Transform(u32 buf[4], u32 const in[16]); static void MD5Transform(u32 buf[4], u32 const in[16]);

View File

@ -15,8 +15,8 @@
#include "utils/includes.h" #include "utils/includes.h"
#include "utils/common.h" #include "utils/common.h"
#include "crypto/md5.h" #include "md5.h"
#include "crypto/crypto.h" #include "crypto.h"
/** /**

View File

@ -10,9 +10,9 @@
#include "utils/includes.h" #include "utils/includes.h"
#include "utils/common.h" #include "utils/common.h"
#include "crypto/sha1.h" #include "sha1.h"
#include "crypto/ms_funcs.h" #include "ms_funcs.h"
#include "crypto/crypto.h" #include "crypto.h"
/** /**
* utf8_to_ucs2 - Convert UTF-8 string to UCS-2 encoding * utf8_to_ucs2 - Convert UTF-8 string to UCS-2 encoding

View File

@ -15,7 +15,7 @@
#include "utils/includes.h" #include "utils/includes.h"
#include "utils/common.h" #include "utils/common.h"
#include "crypto/crypto.h" #include "crypto.h"
#define S_SWAP(a,b) do { u8 t = S[a]; S[a] = S[b]; S[b] = t; } while(0) #define S_SWAP(a,b) do { u8 t = S[a]; S[a] = S[b]; S[b] = t; } while(0)

View File

@ -15,10 +15,10 @@
#include "utils/includes.h" #include "utils/includes.h"
#include "utils/common.h" #include "utils/common.h"
#include "crypto/sha1.h" #include "sha1.h"
#include "crypto/sha1_i.h" #include "sha1_i.h"
#include "crypto/md5.h" #include "md5.h"
#include "crypto/crypto.h" #include "crypto.h"
typedef struct SHA1Context SHA1_CTX; typedef struct SHA1Context SHA1_CTX;

View File

@ -14,9 +14,9 @@
#include "utils/includes.h" #include "utils/includes.h"
#include "utils/common.h" #include "utils/common.h"
#include "crypto/sha1.h" #include "sha1.h"
#include "crypto/md5.h" #include "md5.h"
#include "crypto/crypto.h" #include "crypto.h"
static int static int
pbkdf2_sha1_f(const char *passphrase, const char *ssid, pbkdf2_sha1_f(const char *passphrase, const char *ssid,

View File

@ -15,8 +15,8 @@
#include "utils/includes.h" #include "utils/includes.h"
#include "utils/common.h" #include "utils/common.h"
#include "crypto/sha1.h" #include "sha1.h"
#include "crypto/crypto.h" #include "crypto.h"
/** /**

View File

@ -33,8 +33,8 @@
#ifdef USE_MBEDTLS_CRYPTO #ifdef USE_MBEDTLS_CRYPTO
#include "mbedtls/sha256.h" #include "mbedtls/sha256.h"
#else /* USE_MBEDTLS_CRYPTO */ #else /* USE_MBEDTLS_CRYPTO */
#include "crypto/sha256.h" #include "sha256.h"
#include "crypto/crypto.h" #include "crypto.h"
#endif /* USE_MBEDTLS_CRYPTO */ #endif /* USE_MBEDTLS_CRYPTO */
#ifdef USE_MBEDTLS_CRYPTO #ifdef USE_MBEDTLS_CRYPTO

View File

@ -30,8 +30,8 @@
#include "utils/includes.h" #include "utils/includes.h"
#include "utils/common.h" #include "utils/common.h"
#include "crypto/sha256.h" #include "sha256.h"
#include "crypto/crypto.h" #include "crypto.h"
/** /**

View File

@ -10,7 +10,6 @@
#ifdef EAP_TTLS #ifdef EAP_TTLS
#include "utils/common.h" #include "utils/common.h"
#include "crypto/ms_funcs.h"
#include "crypto/sha1.h" #include "crypto/sha1.h"
#include "tls/tls.h" #include "tls/tls.h"
#include "eap_peer/eap.h" #include "eap_peer/eap.h"

View File

@ -29,7 +29,6 @@
#include "crypto/crypto.h" #include "crypto/crypto.h"
#include "crypto/sha1.h" #include "crypto/sha1.h"
#include "crypto/aes_wrap.h" #include "crypto/aes_wrap.h"
#include "crypto/wepkey.h"
#include "esp_wifi_driver.h" #include "esp_wifi_driver.h"
#include "esp_private/wifi.h" #include "esp_private/wifi.h"

View File

@ -26,7 +26,6 @@
#include "crypto/crypto.h" #include "crypto/crypto.h"
#include "crypto/sha1.h" #include "crypto/sha1.h"
#include "crypto/aes_wrap.h" #include "crypto/aes_wrap.h"
#include "crypto/wepkey.h"
/** /**
* eapol_sm_notify_eap_success - Notification of external EAP success trigger * eapol_sm_notify_eap_success - Notification of external EAP success trigger

View File

@ -14,8 +14,6 @@
#include "utils/wpa_debug.h" #include "utils/wpa_debug.h"
#include "common/ieee802_11_defs.h" #include "common/ieee802_11_defs.h"
#include "crypto/dh_group5.h"
#include "wps/wps_i.h" #include "wps/wps_i.h"
#include "wps/wps_dev_attr.h" #include "wps/wps_dev_attr.h"

View File

@ -11,9 +11,9 @@
#include "crypto/aes_wrap.h" #include "crypto/aes_wrap.h"
#include "crypto/crypto.h" #include "crypto/crypto.h"
#include "crypto/dh_group5.h"
#include "crypto/sha256.h" #include "crypto/sha256.h"
#include "crypto/random.h" #include "crypto/random.h"
#include "crypto/dh_group5.h"
#include "common/ieee802_11_defs.h" #include "common/ieee802_11_defs.h"
#include "wps/wps_i.h" #include "wps/wps_i.h"

View File

@ -12,9 +12,9 @@
#include "crypto/aes_wrap.h" #include "crypto/aes_wrap.h"
#include "crypto/crypto.h" #include "crypto/crypto.h"
#include "crypto/dh_group5.h"
#include "crypto/sha1.h" #include "crypto/sha1.h"
#include "crypto/sha256.h" #include "crypto/sha256.h"
#include "crypto/dh_group5.h"
#include "crypto/random.h" #include "crypto/random.h"
#include "wps/wps_i.h" #include "wps/wps_i.h"