]> granicus.if.org Git - esp-idf/commitdiff
bugfix of wpa2 assert when use sha256 do signature
authorDeng Xin <dengxin@espressif.com>
Mon, 19 Mar 2018 13:18:37 +0000 (21:18 +0800)
committerDeng Xin <dengxin@espressif.com>
Tue, 20 Mar 2018 03:08:20 +0000 (11:08 +0800)
The order of wpa2_crypto_funcs_t structure mismatch between IDF and wifi libray

close github issue https://github.com/espressif/esp-idf/issues/1297

components/esp32/fast_crypto_ops.c
components/esp32/include/esp_wifi_crypto_types.h

index 23c79885be9ce3d522e8f82242c09d65f2d6c08d..66c8e19aff2f531b43386b911374ad220db67a77 100644 (file)
@@ -55,7 +55,7 @@ const wpa2_crypto_funcs_t g_wifi_default_wpa2_crypto_funcs = {
     .crypto_cipher_encrypt = (esp_crypto_cipher_encrypt_t)fast_crypto_cipher_encrypt,
     .crypto_cipher_decrypt = (esp_crypto_cipher_decrypt_t)fast_crypto_cipher_decrypt,
     .crypto_cipher_deinit = (esp_crypto_cipher_deinit_t)fast_crypto_cipher_deinit,
-    .sha256_vector = (esp_sha256_vector_t)fast_sha256_vector,
-    .crypto_mod_exp = (esp_crypto_mod_exp_t)crypto_mod_exp
+    .crypto_mod_exp = (esp_crypto_mod_exp_t)crypto_mod_exp,
+    .sha256_vector = (esp_sha256_vector_t)fast_sha256_vector
 };
 
index e1f2cf824cbb202b6188752ca2de4dc9a6d2e2ce..63f7b1db923365bb1d3b937722c972dad45e1144 100644 (file)
@@ -296,8 +296,8 @@ typedef struct {
     esp_crypto_cipher_encrypt_t crypto_cipher_encrypt;        /**< function used to encrypt cipher when use TLSV1 */
     esp_crypto_cipher_decrypt_t crypto_cipher_decrypt;        /**< function used to decrypt cipher when use TLSV1 */
     esp_crypto_cipher_deinit_t crypto_cipher_deinit;          /**< function used to free context when use TLSV1 */
-    esp_sha256_vector_t sha256_vector;                        /**< function used to do X.509v3 certificate parsing and processing */
     esp_crypto_mod_exp_t crypto_mod_exp;                      /**< function used to do key exchange when use TLSV1 */
+    esp_sha256_vector_t sha256_vector;                        /**< function used to do X.509v3 certificate parsing and processing */
 } wpa2_crypto_funcs_t;
 
 #ifdef __cplusplus