aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2009-11-29 23:04:43 +0200
committerJouni Malinen <j@w1.fi>2009-11-29 23:04:43 +0200
commit03da66bd59567c90dc3b3b0892c3346472a0b413 (patch)
treee074941e0db7e35b7effbf93759aebe789f4105e /src
parent5586f500a0c58b457e512ac01a2a316657474a15 (diff)
downloadexternal_wpa_supplicant_8_ti-03da66bd59567c90dc3b3b0892c3346472a0b413.zip
external_wpa_supplicant_8_ti-03da66bd59567c90dc3b3b0892c3346472a0b413.tar.gz
external_wpa_supplicant_8_ti-03da66bd59567c90dc3b3b0892c3346472a0b413.tar.bz2
Remove src/crypto from default include path
In addition, start ordering header file includes to be in more consistent order: system header files, src/utils, src/*, same directory as the *.c file.
Diffstat (limited to 'src')
-rw-r--r--src/common/wpa_common.c10
-rw-r--r--src/drivers/driver_iphone.m2
-rw-r--r--src/drivers/driver_test.c2
-rw-r--r--src/eap_common/chap.c3
-rw-r--r--src/eap_common/eap_fast_common.c4
-rw-r--r--src/eap_common/eap_gpsk_common.c7
-rw-r--r--src/eap_common/eap_pax_common.c2
-rw-r--r--src/eap_common/eap_peap_common.c2
-rw-r--r--src/eap_common/eap_psk_common.c2
-rw-r--r--src/eap_common/eap_sake_common.c2
-rw-r--r--src/eap_common/eap_sim_common.c10
-rw-r--r--src/eap_common/ikev2_common.c6
-rw-r--r--src/eap_peer/eap.c10
-rw-r--r--src/eap_peer/eap_aka.c14
-rw-r--r--src/eap_peer/eap_fast.c6
-rw-r--r--src/eap_peer/eap_leap.c4
-rw-r--r--src/eap_peer/eap_mschapv2.c6
-rw-r--r--src/eap_peer/eap_pax.c4
-rw-r--r--src/eap_peer/eap_peap.c6
-rw-r--r--src/eap_peer/eap_psk.c4
-rw-r--r--src/eap_peer/eap_tls.c2
-rw-r--r--src/eap_peer/eap_tls_common.c4
-rw-r--r--src/eap_peer/eap_ttls.c13
-rw-r--r--src/eap_peer/ikev2.c2
-rw-r--r--src/eap_peer/mschapv2.c2
-rw-r--r--src/eap_server/eap_aka.c7
-rw-r--r--src/eap_server/eap_fast.c10
-rw-r--r--src/eap_server/eap_mschapv2.c2
-rw-r--r--src/eap_server/eap_peap.c4
-rw-r--r--src/eap_server/eap_psk.c4
-rw-r--r--src/eap_server/eap_tls.c2
-rw-r--r--src/eap_server/eap_tls_common.c4
-rw-r--r--src/eap_server/eap_ttls.c6
-rw-r--r--src/eap_server/ikev2.c2
-rw-r--r--src/eapol_supp/eapol_supp_sm.c12
-rw-r--r--src/hlr_auc_gw/milenage.c2
-rw-r--r--src/radius/radius.c4
-rw-r--r--src/rsn_supp/peerkey.c6
-rw-r--r--src/rsn_supp/pmksa_cache.c6
-rw-r--r--src/rsn_supp/wpa.c8
-rw-r--r--src/rsn_supp/wpa_ft.c6
-rw-r--r--src/tls/pkcs5.c4
-rw-r--r--src/tls/rsa.c1
-rw-r--r--src/tls/tlsv1_client.c4
-rw-r--r--src/tls/tlsv1_client_read.c6
-rw-r--r--src/tls/tlsv1_client_write.c6
-rw-r--r--src/tls/tlsv1_common.h2
-rw-r--r--src/tls/tlsv1_cred.c2
-rw-r--r--src/tls/tlsv1_record.c4
-rw-r--r--src/tls/tlsv1_record.h2
-rw-r--r--src/tls/tlsv1_server.c4
-rw-r--r--src/tls/tlsv1_server_read.c6
-rw-r--r--src/tls/tlsv1_server_write.c6
-rw-r--r--src/tls/x509v3.c2
-rw-r--r--src/wps/wps.c4
-rw-r--r--src/wps/wps_attr_build.c8
-rw-r--r--src/wps/wps_attr_process.c2
-rw-r--r--src/wps/wps_common.c10
-rw-r--r--src/wps/wps_enrollee.c4
-rw-r--r--src/wps/wps_registrar.c6
60 files changed, 142 insertions, 155 deletions
diff --git a/src/common/wpa_common.c b/src/common/wpa_common.c
index 1362947..c9c0e00 100644
--- a/src/common/wpa_common.c
+++ b/src/common/wpa_common.c
@@ -15,11 +15,11 @@
#include "includes.h"
#include "common.h"
-#include "md5.h"
-#include "sha1.h"
-#include "sha256.h"
-#include "aes_wrap.h"
-#include "crypto.h"
+#include "crypto/md5.h"
+#include "crypto/sha1.h"
+#include "crypto/sha256.h"
+#include "crypto/aes_wrap.h"
+#include "crypto/crypto.h"
#include "ieee802_11_defs.h"
#include "defs.h"
#include "wpa_common.h"
diff --git a/src/drivers/driver_iphone.m b/src/drivers/driver_iphone.m
index 8e64ffd..8213fda 100644
--- a/src/drivers/driver_iphone.m
+++ b/src/drivers/driver_iphone.m
@@ -20,7 +20,7 @@
#include "common.h"
#include "driver.h"
#include "eloop.h"
-#include "ieee802_11_defs.h"
+#include "common/ieee802_11_defs.h"
#include "MobileApple80211.h"
diff --git a/src/drivers/driver_test.c b/src/drivers/driver_test.c
index 546adb9..9dece95 100644
--- a/src/drivers/driver_test.c
+++ b/src/drivers/driver_test.c
@@ -31,7 +31,7 @@
#include "driver.h"
#include "l2_packet/l2_packet.h"
#include "eloop.h"
-#include "sha1.h"
+#include "crypto/sha1.h"
#include "common/ieee802_11_defs.h"
#include "../../hostapd/hostapd.h"
diff --git a/src/eap_common/chap.c b/src/eap_common/chap.c
index 5b7e07e..60bfc1c 100644
--- a/src/eap_common/chap.c
+++ b/src/eap_common/chap.c
@@ -15,8 +15,7 @@
#include "includes.h"
#include "common.h"
-#include "md5.h"
-#include "crypto.h"
+#include "crypto/crypto.h"
#include "chap.h"
int chap_md5(u8 id, const u8 *secret, size_t secret_len, const u8 *challenge,
diff --git a/src/eap_common/eap_fast_common.c b/src/eap_common/eap_fast_common.c
index 4d3deaf..4de34a8 100644
--- a/src/eap_common/eap_fast_common.c
+++ b/src/eap_common/eap_fast_common.c
@@ -15,8 +15,8 @@
#include "includes.h"
#include "common.h"
-#include "sha1.h"
-#include "tls.h"
+#include "crypto/sha1.h"
+#include "crypto/tls.h"
#include "eap_defs.h"
#include "eap_tlv_common.h"
#include "eap_fast_common.h"
diff --git a/src/eap_common/eap_gpsk_common.c b/src/eap_common/eap_gpsk_common.c
index 414610c..4076262 100644
--- a/src/eap_common/eap_gpsk_common.c
+++ b/src/eap_common/eap_gpsk_common.c
@@ -15,12 +15,9 @@
#include "includes.h"
#include "common.h"
+#include "crypto/aes_wrap.h"
+#include "crypto/sha256.h"
#include "eap_defs.h"
-#include "aes_wrap.h"
-#include "crypto.h"
-#ifdef EAP_GPSK_SHA256
-#include "sha256.h"
-#endif /* EAP_GPSK_SHA256 */
#include "eap_gpsk_common.h"
diff --git a/src/eap_common/eap_pax_common.c b/src/eap_common/eap_pax_common.c
index 8011046..32dc80c 100644
--- a/src/eap_common/eap_pax_common.c
+++ b/src/eap_common/eap_pax_common.c
@@ -15,7 +15,7 @@
#include "includes.h"
#include "common.h"
-#include "sha1.h"
+#include "crypto/sha1.h"
#include "eap_pax_common.h"
diff --git a/src/eap_common/eap_peap_common.c b/src/eap_common/eap_peap_common.c
index 14625f9..3a64b8e 100644
--- a/src/eap_common/eap_peap_common.c
+++ b/src/eap_common/eap_peap_common.c
@@ -15,7 +15,7 @@
#include "includes.h"
#include "common.h"
-#include "sha1.h"
+#include "crypto/sha1.h"
#include "eap_peap_common.h"
void peap_prfplus(int version, const u8 *key, size_t key_len,
diff --git a/src/eap_common/eap_psk_common.c b/src/eap_common/eap_psk_common.c
index 0def3e8..7417d5c 100644
--- a/src/eap_common/eap_psk_common.c
+++ b/src/eap_common/eap_psk_common.c
@@ -15,7 +15,7 @@
#include "includes.h"
#include "common.h"
-#include "aes_wrap.h"
+#include "crypto/aes_wrap.h"
#include "eap_defs.h"
#include "eap_psk_common.h"
diff --git a/src/eap_common/eap_sake_common.c b/src/eap_common/eap_sake_common.c
index eafad1d..9002b0c 100644
--- a/src/eap_common/eap_sake_common.c
+++ b/src/eap_common/eap_sake_common.c
@@ -15,8 +15,8 @@
#include "includes.h"
#include "common.h"
-#include "sha1.h"
#include "wpabuf.h"
+#include "crypto/sha1.h"
#include "eap_defs.h"
#include "eap_sake_common.h"
diff --git a/src/eap_common/eap_sim_common.c b/src/eap_common/eap_sim_common.c
index 79fda1f..56b4ded 100644
--- a/src/eap_common/eap_sim_common.c
+++ b/src/eap_common/eap_sim_common.c
@@ -15,12 +15,12 @@
#include "includes.h"
#include "common.h"
-#include "eap_common/eap_defs.h"
-#include "sha1.h"
-#include "sha256.h"
-#include "crypto.h"
-#include "aes_wrap.h"
#include "wpabuf.h"
+#include "crypto/aes_wrap.h"
+#include "crypto/crypto.h"
+#include "crypto/sha1.h"
+#include "crypto/sha256.h"
+#include "eap_common/eap_defs.h"
#include "eap_common/eap_sim_common.h"
diff --git a/src/eap_common/ikev2_common.c b/src/eap_common/ikev2_common.c
index 818b5bd..67754d8 100644
--- a/src/eap_common/ikev2_common.c
+++ b/src/eap_common/ikev2_common.c
@@ -15,9 +15,9 @@
#include "includes.h"
#include "common.h"
-#include "sha1.h"
-#include "md5.h"
-#include "crypto.h"
+#include "crypto/crypto.h"
+#include "crypto/md5.h"
+#include "crypto/sha1.h"
#include "ikev2_common.h"
diff --git a/src/eap_peer/eap.c b/src/eap_peer/eap.c
index dd9a8be..0630f9a 100644
--- a/src/eap_peer/eap.c
+++ b/src/eap_peer/eap.c
@@ -24,14 +24,14 @@
#include "includes.h"
#include "common.h"
-#include "eap_i.h"
-#include "eap_config.h"
-#include "tls.h"
-#include "crypto.h"
#include "pcsc_funcs.h"
-#include "common/wpa_ctrl.h"
#include "state_machine.h"
+#include "crypto/crypto.h"
+#include "crypto/tls.h"
+#include "common/wpa_ctrl.h"
#include "eap_common/eap_wsc_common.h"
+#include "eap_i.h"
+#include "eap_config.h"
#define STATE_MACHINE_DATA struct eap_sm
#define STATE_MACHINE_DEBUG_PREFIX "EAP"
diff --git a/src/eap_peer/eap_aka.c b/src/eap_peer/eap_aka.c
index f237141..f00031e 100644
--- a/src/eap_peer/eap_aka.c
+++ b/src/eap_peer/eap_aka.c
@@ -15,16 +15,14 @@
#include "includes.h"
#include "common.h"
-#include "eap_peer/eap_i.h"
#include "pcsc_funcs.h"
-#include "eap_common/eap_sim_common.h"
-#include "sha1.h"
-#include "sha256.h"
-#include "crypto.h"
-#include "eap_peer/eap_config.h"
-#ifdef CONFIG_USIM_SIMULATOR
+#include "crypto/crypto.h"
+#include "crypto/sha1.h"
+#include "crypto/sha256.h"
#include "hlr_auc_gw/milenage.h"
-#endif /* CONFIG_USIM_SIMULATOR */
+#include "eap_common/eap_sim_common.h"
+#include "eap_config.h"
+#include "eap_i.h"
struct eap_aka_data {
diff --git a/src/eap_peer/eap_fast.c b/src/eap_peer/eap_fast.c
index d008670..c46db01 100644
--- a/src/eap_peer/eap_fast.c
+++ b/src/eap_peer/eap_fast.c
@@ -15,12 +15,12 @@
#include "includes.h"
#include "common.h"
+#include "crypto/tls.h"
+#include "crypto/sha1.h"
+#include "eap_common/eap_tlv_common.h"
#include "eap_i.h"
#include "eap_tls_common.h"
#include "eap_config.h"
-#include "tls.h"
-#include "eap_common/eap_tlv_common.h"
-#include "sha1.h"
#include "eap_fast_pac.h"
#ifdef EAP_FAST_DYNAMIC
diff --git a/src/eap_peer/eap_leap.c b/src/eap_peer/eap_leap.c
index 526ce93..a7c94a4 100644
--- a/src/eap_peer/eap_leap.c
+++ b/src/eap_peer/eap_leap.c
@@ -15,9 +15,9 @@
#include "includes.h"
#include "common.h"
+#include "crypto/ms_funcs.h"
+#include "crypto/crypto.h"
#include "eap_i.h"
-#include "ms_funcs.h"
-#include "crypto.h"
#define LEAP_VERSION 1
#define LEAP_CHALLENGE_LEN 8
diff --git a/src/eap_peer/eap_mschapv2.c b/src/eap_peer/eap_mschapv2.c
index d0ca44d..cd410d9 100644
--- a/src/eap_peer/eap_mschapv2.c
+++ b/src/eap_peer/eap_mschapv2.c
@@ -22,11 +22,11 @@
#include "includes.h"
#include "common.h"
-#include "eap_i.h"
-#include "eap_config.h"
-#include "ms_funcs.h"
+#include "crypto/ms_funcs.h"
#include "common/wpa_ctrl.h"
#include "mschapv2.h"
+#include "eap_i.h"
+#include "eap_config.h"
#ifdef _MSC_VER
diff --git a/src/eap_peer/eap_pax.c b/src/eap_peer/eap_pax.c
index afd56dd..2e04831 100644
--- a/src/eap_peer/eap_pax.c
+++ b/src/eap_peer/eap_pax.c
@@ -15,10 +15,8 @@
#include "includes.h"
#include "common.h"
-#include "eap_peer/eap_i.h"
#include "eap_common/eap_pax_common.h"
-#include "sha1.h"
-#include "crypto.h"
+#include "eap_i.h"
/*
* Note: only PAX_STD subprotocol is currently supported
diff --git a/src/eap_peer/eap_peap.c b/src/eap_peer/eap_peap.c
index 894fc63..2864f45 100644
--- a/src/eap_peer/eap_peap.c
+++ b/src/eap_peer/eap_peap.c
@@ -16,12 +16,12 @@
#include "common.h"
#include "crypto/sha1.h"
+#include "crypto/tls.h"
+#include "eap_common/eap_tlv_common.h"
+#include "eap_common/eap_peap_common.h"
#include "eap_i.h"
#include "eap_tls_common.h"
#include "eap_config.h"
-#include "tls.h"
-#include "eap_common/eap_tlv_common.h"
-#include "eap_common/eap_peap_common.h"
#include "tncc.h"
diff --git a/src/eap_peer/eap_psk.c b/src/eap_peer/eap_psk.c
index 1ce6356..ccf871e 100644
--- a/src/eap_peer/eap_psk.c
+++ b/src/eap_peer/eap_psk.c
@@ -18,9 +18,9 @@
#include "includes.h"
#include "common.h"
-#include "eap_peer/eap_i.h"
-#include "aes_wrap.h"
+#include "crypto/aes_wrap.h"
#include "eap_common/eap_psk_common.h"
+#include "eap_i.h"
struct eap_psk_data {
diff --git a/src/eap_peer/eap_tls.c b/src/eap_peer/eap_tls.c
index 31344a9..20b2212 100644
--- a/src/eap_peer/eap_tls.c
+++ b/src/eap_peer/eap_tls.c
@@ -15,10 +15,10 @@
#include "includes.h"
#include "common.h"
+#include "crypto/tls.h"
#include "eap_i.h"
#include "eap_tls_common.h"
#include "eap_config.h"
-#include "tls.h"
static void eap_tls_deinit(struct eap_sm *sm, void *priv);
diff --git a/src/eap_peer/eap_tls_common.c b/src/eap_peer/eap_tls_common.c
index 19afb90..43ee584 100644
--- a/src/eap_peer/eap_tls_common.c
+++ b/src/eap_peer/eap_tls_common.c
@@ -15,11 +15,11 @@
#include "includes.h"
#include "common.h"
+#include "crypto/sha1.h"
+#include "crypto/tls.h"
#include "eap_i.h"
#include "eap_tls_common.h"
#include "eap_config.h"
-#include "sha1.h"
-#include "tls.h"
static int eap_tls_check_blob(struct eap_sm *sm, const char **name,
diff --git a/src/eap_peer/eap_ttls.c b/src/eap_peer/eap_ttls.c
index f2eb0db..800f1b5 100644
--- a/src/eap_peer/eap_ttls.c
+++ b/src/eap_peer/eap_ttls.c
@@ -15,15 +15,14 @@
#include "includes.h"
#include "common.h"
-#include "eap_peer/eap_i.h"
-#include "eap_peer/eap_tls_common.h"
-#include "eap_peer/eap_config.h"
-#include "ms_funcs.h"
-#include "sha1.h"
+#include "crypto/ms_funcs.h"
+#include "crypto/tls.h"
#include "eap_common/chap.h"
-#include "tls.h"
-#include "mschapv2.h"
#include "eap_common/eap_ttls.h"
+#include "mschapv2.h"
+#include "eap_i.h"
+#include "eap_tls_common.h"
+#include "eap_config.h"
/* Maximum supported TTLS version
diff --git a/src/eap_peer/ikev2.c b/src/eap_peer/ikev2.c
index 9172e1f..309a331 100644
--- a/src/eap_peer/ikev2.c
+++ b/src/eap_peer/ikev2.c
@@ -15,7 +15,7 @@
#include "includes.h"
#include "common.h"
-#include "dh_groups.h"
+#include "crypto/dh_groups.h"
#include "ikev2.h"
diff --git a/src/eap_peer/mschapv2.c b/src/eap_peer/mschapv2.c
index 49235b5..b8fb075 100644
--- a/src/eap_peer/mschapv2.c
+++ b/src/eap_peer/mschapv2.c
@@ -15,7 +15,7 @@
#include "includes.h"
#include "common.h"
-#include "ms_funcs.h"
+#include "crypto/ms_funcs.h"
#include "mschapv2.h"
const u8 * mschapv2_remove_domain(const u8 *username, size_t *len)
diff --git a/src/eap_server/eap_aka.c b/src/eap_server/eap_aka.c
index 033dfbb..4e7db48 100644
--- a/src/eap_server/eap_aka.c
+++ b/src/eap_server/eap_aka.c
@@ -15,12 +15,11 @@
#include "includes.h"
#include "common.h"
-#include "eap_server/eap_i.h"
+#include "crypto/sha256.h"
+#include "crypto/crypto.h"
#include "eap_common/eap_sim_common.h"
+#include "eap_server/eap_i.h"
#include "eap_server/eap_sim_db.h"
-#include "sha1.h"
-#include "sha256.h"
-#include "crypto.h"
struct eap_aka_data {
diff --git a/src/eap_server/eap_fast.c b/src/eap_server/eap_fast.c
index 3563908..e42b2af 100644
--- a/src/eap_server/eap_fast.c
+++ b/src/eap_server/eap_fast.c
@@ -15,13 +15,13 @@
#include "includes.h"
#include "common.h"
-#include "aes_wrap.h"
-#include "sha1.h"
-#include "eap_i.h"
-#include "eap_tls_common.h"
-#include "tls.h"
+#include "crypto/aes_wrap.h"
+#include "crypto/sha1.h"
+#include "crypto/tls.h"
#include "eap_common/eap_tlv_common.h"
#include "eap_common/eap_fast_common.h"
+#include "eap_i.h"
+#include "eap_tls_common.h"
static void eap_fast_reset(struct eap_sm *sm, void *priv);
diff --git a/src/eap_server/eap_mschapv2.c b/src/eap_server/eap_mschapv2.c
index 8b7b352..39d1c6e 100644
--- a/src/eap_server/eap_mschapv2.c
+++ b/src/eap_server/eap_mschapv2.c
@@ -15,8 +15,8 @@
#include "includes.h"
#include "common.h"
+#include "crypto/ms_funcs.h"
#include "eap_i.h"
-#include "ms_funcs.h"
struct eap_mschapv2_hdr {
diff --git a/src/eap_server/eap_peap.c b/src/eap_server/eap_peap.c
index 4789e57..9ffb15d 100644
--- a/src/eap_server/eap_peap.c
+++ b/src/eap_server/eap_peap.c
@@ -15,12 +15,12 @@
#include "includes.h"
#include "common.h"
-#include "sha1.h"
+#include "crypto/sha1.h"
+#include "crypto/tls.h"
#include "eap_i.h"
#include "eap_tls_common.h"
#include "eap_common/eap_tlv_common.h"
#include "eap_common/eap_peap_common.h"
-#include "tls.h"
#include "tncs.h"
diff --git a/src/eap_server/eap_psk.c b/src/eap_server/eap_psk.c
index c68d4c3..4c30346 100644
--- a/src/eap_server/eap_psk.c
+++ b/src/eap_server/eap_psk.c
@@ -18,9 +18,9 @@
#include "includes.h"
#include "common.h"
-#include "eap_server/eap_i.h"
-#include "aes_wrap.h"
+#include "crypto/aes_wrap.h"
#include "eap_common/eap_psk_common.h"
+#include "eap_server/eap_i.h"
struct eap_psk_data {
diff --git a/src/eap_server/eap_tls.c b/src/eap_server/eap_tls.c
index 5747940..412bb8a 100644
--- a/src/eap_server/eap_tls.c
+++ b/src/eap_server/eap_tls.c
@@ -17,7 +17,7 @@
#include "common.h"
#include "eap_i.h"
#include "eap_tls_common.h"
-#include "tls.h"
+#include "crypto/tls.h"
static void eap_tls_reset(struct eap_sm *sm, void *priv);
diff --git a/src/eap_server/eap_tls_common.c b/src/eap_server/eap_tls_common.c
index befc1bf..d26aa23 100644
--- a/src/eap_server/eap_tls_common.c
+++ b/src/eap_server/eap_tls_common.c
@@ -15,10 +15,10 @@
#include "includes.h"
#include "common.h"
+#include "crypto/sha1.h"
+#include "crypto/tls.h"
#include "eap_i.h"
#include "eap_tls_common.h"
-#include "sha1.h"
-#include "tls.h"
int eap_server_tls_ssl_init(struct eap_sm *sm, struct eap_ssl_data *data,
diff --git a/src/eap_server/eap_ttls.c b/src/eap_server/eap_ttls.c
index 6fe3bb1..c59b9d1 100644
--- a/src/eap_server/eap_ttls.c
+++ b/src/eap_server/eap_ttls.c
@@ -15,12 +15,12 @@
#include "includes.h"
#include "common.h"
+#include "crypto/ms_funcs.h"
+#include "crypto/sha1.h"
+#include "crypto/tls.h"
#include "eap_server/eap_i.h"
#include "eap_server/eap_tls_common.h"
-#include "ms_funcs.h"
-#include "sha1.h"
#include "eap_common/chap.h"
-#include "tls.h"
#include "eap_common/eap_ttls.h"
diff --git a/src/eap_server/ikev2.c b/src/eap_server/ikev2.c
index 46767c5..435ba26 100644
--- a/src/eap_server/ikev2.c
+++ b/src/eap_server/ikev2.c
@@ -15,7 +15,7 @@
#include "includes.h"
#include "common.h"
-#include "dh_groups.h"
+#include "crypto/dh_groups.h"
#include "ikev2.h"
diff --git a/src/eapol_supp/eapol_supp_sm.c b/src/eapol_supp/eapol_supp_sm.c
index f3dc4bf..01f0ec1 100644
--- a/src/eapol_supp/eapol_supp_sm.c
+++ b/src/eapol_supp/eapol_supp_sm.c
@@ -15,14 +15,14 @@
#include "includes.h"
#include "common.h"
-#include "eapol_supp_sm.h"
-#include "eap_peer/eap.h"
-#include "eloop.h"
-#include "common/eapol_common.h"
-#include "md5.h"
-#include "crypto.h"
#include "state_machine.h"
#include "wpabuf.h"
+#include "eloop.h"
+#include "crypto/crypto.h"
+#include "crypto/md5.h"
+#include "common/eapol_common.h"
+#include "eap_peer/eap.h"
+#include "eapol_supp_sm.h"
#define STATE_MACHINE_DATA struct eapol_sm
#define STATE_MACHINE_DEBUG_PREFIX "EAPOL"
diff --git a/src/hlr_auc_gw/milenage.c b/src/hlr_auc_gw/milenage.c
index 0ce5ef3..43186c7 100644
--- a/src/hlr_auc_gw/milenage.c
+++ b/src/hlr_auc_gw/milenage.c
@@ -24,8 +24,8 @@
#include "includes.h"
#include "common.h"
+#include "crypto/aes_wrap.h"
#include "milenage.h"
-#include "aes_wrap.h"
/**
diff --git a/src/radius/radius.c b/src/radius/radius.c
index 1d96499..75c2677 100644
--- a/src/radius/radius.c
+++ b/src/radius/radius.c
@@ -16,8 +16,8 @@
#include "common.h"
#include "radius.h"
-#include "md5.h"
-#include "crypto.h"
+#include "crypto/md5.h"
+#include "crypto/crypto.h"
static struct radius_attr_hdr *
diff --git a/src/rsn_supp/peerkey.c b/src/rsn_supp/peerkey.c
index ae567ca..59f7279 100644
--- a/src/rsn_supp/peerkey.c
+++ b/src/rsn_supp/peerkey.c
@@ -17,13 +17,13 @@
#ifdef CONFIG_PEERKEY
#include "common.h"
-#include "sha1.h"
-#include "sha256.h"
#include "eloop.h"
+#include "crypto/sha1.h"
+#include "crypto/sha256.h"
+#include "common/ieee802_11_defs.h"
#include "wpa.h"
#include "wpa_i.h"
#include "wpa_ie.h"
-#include "common/ieee802_11_defs.h"
#include "peerkey.h"
diff --git a/src/rsn_supp/pmksa_cache.c b/src/rsn_supp/pmksa_cache.c
index 94b255f..cac8c83 100644
--- a/src/rsn_supp/pmksa_cache.c
+++ b/src/rsn_supp/pmksa_cache.c
@@ -15,12 +15,10 @@
#include "includes.h"
#include "common.h"
-#include "wpa.h"
#include "eloop.h"
-#include "sha1.h"
-#include "sha256.h"
-#include "wpa_i.h"
#include "eapol_supp/eapol_supp_sm.h"
+#include "wpa.h"
+#include "wpa_i.h"
#include "pmksa_cache.h"
#if defined(IEEE8021X_EAPOL) && !defined(CONFIG_NO_WPA2)
diff --git a/src/rsn_supp/wpa.c b/src/rsn_supp/wpa.c
index 887bf00..e84771f 100644
--- a/src/rsn_supp/wpa.c
+++ b/src/rsn_supp/wpa.c
@@ -15,17 +15,17 @@
#include "includes.h"
#include "common.h"
-#include "crypto.h"
-#include "aes_wrap.h"
+#include "crypto/aes_wrap.h"
+#include "crypto/crypto.h"
+#include "common/ieee802_11_defs.h"
+#include "eapol_supp/eapol_supp_sm.h"
#include "wpa.h"
#include "eloop.h"
-#include "eapol_supp/eapol_supp_sm.h"
#include "preauth.h"
#include "pmksa_cache.h"
#include "wpa_i.h"
#include "wpa_ie.h"
#include "peerkey.h"
-#include "common/ieee802_11_defs.h"
/**
diff --git a/src/rsn_supp/wpa_ft.c b/src/rsn_supp/wpa_ft.c
index 5b7d528..a7da7e0 100644
--- a/src/rsn_supp/wpa_ft.c
+++ b/src/rsn_supp/wpa_ft.c
@@ -15,12 +15,12 @@
#include "includes.h"
#include "common.h"
+#include "crypto/aes_wrap.h"
+#include "common/ieee802_11_defs.h"
+#include "common/ieee802_11_common.h"
#include "wpa.h"
#include "wpa_i.h"
#include "wpa_ie.h"
-#include "aes_wrap.h"
-#include "common/ieee802_11_defs.h"
-#include "common/ieee802_11_common.h"
#ifdef CONFIG_IEEE80211R
diff --git a/src/tls/pkcs5.c b/src/tls/pkcs5.c
index 9b8e425..4291b84 100644
--- a/src/tls/pkcs5.c
+++ b/src/tls/pkcs5.c
@@ -15,8 +15,8 @@
#include "includes.h"
#include "common.h"
-#include "crypto.h"
-#include "md5.h"
+#include "crypto/crypto.h"
+#include "crypto/md5.h"
#include "asn1.h"
#include "pkcs5.h"
diff --git a/src/tls/rsa.c b/src/tls/rsa.c
index 4965a2a..03676ba 100644
--- a/src/tls/rsa.c
+++ b/src/tls/rsa.c
@@ -15,7 +15,6 @@
#include "includes.h"
#include "common.h"
-#include "crypto.h"
#include "asn1.h"
#include "bignum.h"
#include "rsa.h"
diff --git a/src/tls/tlsv1_client.c b/src/tls/tlsv1_client.c
index 0bf1174..2197785 100644
--- a/src/tls/tlsv1_client.c
+++ b/src/tls/tlsv1_client.c
@@ -15,8 +15,8 @@
#include "includes.h"
#include "common.h"
-#include "sha1.h"
-#include "tls.h"
+#include "crypto/sha1.h"
+#include "crypto/tls.h"
#include "tlsv1_common.h"
#include "tlsv1_record.h"
#include "tlsv1_client.h"
diff --git a/src/tls/tlsv1_client_read.c b/src/tls/tlsv1_client_read.c
index ee20330..ed3f260 100644
--- a/src/tls/tlsv1_client_read.c
+++ b/src/tls/tlsv1_client_read.c
@@ -15,10 +15,10 @@
#include "includes.h"
#include "common.h"
-#include "md5.h"
-#include "sha1.h"
+#include "crypto/md5.h"
+#include "crypto/sha1.h"
+#include "crypto/tls.h"
#include "x509v3.h"
-#include "tls.h"
#include "tlsv1_common.h"
#include "tlsv1_record.h"
#include "tlsv1_client.h"
diff --git a/src/tls/tlsv1_client_write.c b/src/tls/tlsv1_client_write.c
index e0c95cb..2220dec 100644
--- a/src/tls/tlsv1_client_write.c
+++ b/src/tls/tlsv1_client_write.c
@@ -15,10 +15,10 @@
#include "includes.h"
#include "common.h"
-#include "md5.h"
-#include "sha1.h"
+#include "crypto/md5.h"
+#include "crypto/sha1.h"
+#include "crypto/tls.h"
#include "x509v3.h"
-#include "tls.h"
#include "tlsv1_common.h"
#include "tlsv1_record.h"
#include "tlsv1_client.h"
diff --git a/src/tls/tlsv1_common.h b/src/tls/tlsv1_common.h
index 7750564..763a4af 100644
--- a/src/tls/tlsv1_common.h
+++ b/src/tls/tlsv1_common.h
@@ -15,7 +15,7 @@
#ifndef TLSV1_COMMON_H
#define TLSV1_COMMON_H
-#include "crypto.h"
+#include "crypto/crypto.h"
#define TLS_VERSION 0x0301 /* TLSv1 */
#define TLS_RANDOM_LEN 32
diff --git a/src/tls/tlsv1_cred.c b/src/tls/tlsv1_cred.c
index a416998..aa467ef 100644
--- a/src/tls/tlsv1_cred.c
+++ b/src/tls/tlsv1_cred.c
@@ -16,7 +16,7 @@
#include "common.h"
#include "base64.h"
-#include "crypto.h"
+#include "crypto/crypto.h"
#include "x509v3.h"
#include "tlsv1_cred.h"
diff --git a/src/tls/tlsv1_record.c b/src/tls/tlsv1_record.c
index f226ac3..e811f0e 100644
--- a/src/tls/tlsv1_record.c
+++ b/src/tls/tlsv1_record.c
@@ -15,8 +15,8 @@
#include "includes.h"
#include "common.h"
-#include "md5.h"
-#include "sha1.h"
+#include "crypto/md5.h"
+#include "crypto/sha1.h"
#include "tlsv1_common.h"
#include "tlsv1_record.h"
diff --git a/src/tls/tlsv1_record.h b/src/tls/tlsv1_record.h
index 9170fb1..9c7c0a4 100644
--- a/src/tls/tlsv1_record.h
+++ b/src/tls/tlsv1_record.h
@@ -15,7 +15,7 @@
#ifndef TLSV1_RECORD_H
#define TLSV1_RECORD_H
-#include "crypto.h"
+#include "crypto/crypto.h"
#define TLS_MAX_WRITE_MAC_SECRET_LEN 20
#define TLS_MAX_WRITE_KEY_LEN 32
diff --git a/src/tls/tlsv1_server.c b/src/tls/tlsv1_server.c
index 093c874..fdb9a74 100644
--- a/src/tls/tlsv1_server.c
+++ b/src/tls/tlsv1_server.c
@@ -15,8 +15,8 @@
#include "includes.h"
#include "common.h"
-#include "sha1.h"
-#include "tls.h"
+#include "crypto/sha1.h"
+#include "crypto/tls.h"
#include "tlsv1_common.h"
#include "tlsv1_record.h"
#include "tlsv1_server.h"
diff --git a/src/tls/tlsv1_server_read.c b/src/tls/tlsv1_server_read.c
index e6a71f9..e7a195a 100644
--- a/src/tls/tlsv1_server_read.c
+++ b/src/tls/tlsv1_server_read.c
@@ -15,10 +15,10 @@
#include "includes.h"
#include "common.h"
-#include "md5.h"
-#include "sha1.h"
+#include "crypto/md5.h"
+#include "crypto/sha1.h"
+#include "crypto/tls.h"
#include "x509v3.h"
-#include "tls.h"
#include "tlsv1_common.h"
#include "tlsv1_record.h"
#include "tlsv1_server.h"
diff --git a/src/tls/tlsv1_server_write.c b/src/tls/tlsv1_server_write.c
index 7386150..16a8a29 100644
--- a/src/tls/tlsv1_server_write.c
+++ b/src/tls/tlsv1_server_write.c
@@ -15,10 +15,10 @@
#include "includes.h"
#include "common.h"
-#include "md5.h"
-#include "sha1.h"
+#include "crypto/md5.h"
+#include "crypto/sha1.h"
+#include "crypto/tls.h"
#include "x509v3.h"
-#include "tls.h"
#include "tlsv1_common.h"
#include "tlsv1_record.h"
#include "tlsv1_server.h"
diff --git a/src/tls/x509v3.c b/src/tls/x509v3.c
index b3420e3..87bcde9 100644
--- a/src/tls/x509v3.c
+++ b/src/tls/x509v3.c
@@ -18,8 +18,8 @@
#ifdef CONFIG_INTERNAL_X509
+#include "crypto/crypto.h"
#include "asn1.h"
-#include "crypto.h"
#include "x509v3.h"
diff --git a/src/wps/wps.c b/src/wps/wps.c
index 251883d..5be2b9a 100644
--- a/src/wps/wps.c
+++ b/src/wps/wps.c
@@ -15,10 +15,10 @@
#include "includes.h"
#include "common.h"
-#include "dh_group5.h"
+#include "crypto/dh_group5.h"
+#include "common/ieee802_11_defs.h"
#include "wps_i.h"
#include "wps_dev_attr.h"
-#include "common/ieee802_11_defs.h"
/**
diff --git a/src/wps/wps_attr_build.c b/src/wps/wps_attr_build.c
index 265eb18..bb21c40 100644
--- a/src/wps/wps_attr_build.c
+++ b/src/wps/wps_attr_build.c
@@ -15,10 +15,10 @@
#include "includes.h"
#include "common.h"
-#include "dh_group5.h"
-#include "crypto.h"
-#include "sha256.h"
-#include "aes_wrap.h"
+#include "crypto/aes_wrap.h"
+#include "crypto/crypto.h"
+#include "crypto/dh_group5.h"
+#include "crypto/sha256.h"
#include "wps_i.h"
diff --git a/src/wps/wps_attr_process.c b/src/wps/wps_attr_process.c
index ae6e906..7c84ca9 100644
--- a/src/wps/wps_attr_process.c
+++ b/src/wps/wps_attr_process.c
@@ -15,7 +15,7 @@
#include "includes.h"
#include "common.h"
-#include "sha256.h"
+#include "crypto/sha256.h"
#include "wps_i.h"
diff --git a/src/wps/wps_common.c b/src/wps/wps_common.c
index dab85b7..b5e1d0f 100644
--- a/src/wps/wps_common.c
+++ b/src/wps/wps_common.c
@@ -15,11 +15,11 @@
#include "includes.h"
#include "common.h"
-#include "dh_group5.h"
-#include "sha1.h"
-#include "sha256.h"
-#include "aes_wrap.h"
-#include "crypto.h"
+#include "crypto/aes_wrap.h"
+#include "crypto/crypto.h"
+#include "crypto/dh_group5.h"
+#include "crypto/sha1.h"
+#include "crypto/sha256.h"
#include "wps_i.h"
#include "wps_dev_attr.h"
diff --git a/src/wps/wps_enrollee.c b/src/wps/wps_enrollee.c
index a7b8227..33b4420 100644
--- a/src/wps/wps_enrollee.c
+++ b/src/wps/wps_enrollee.c
@@ -15,10 +15,10 @@
#include "includes.h"
#include "common.h"
-#include "sha256.h"
+#include "crypto/crypto.h"
+#include "crypto/sha256.h"
#include "wps_i.h"
#include "wps_dev_attr.h"
-#include "crypto.h"
static int wps_build_mac_addr(struct wps_data *wps, struct wpabuf *msg)
diff --git a/src/wps/wps_registrar.c b/src/wps/wps_registrar.c
index fe4b49b..2da674b 100644
--- a/src/wps/wps_registrar.c
+++ b/src/wps/wps_registrar.c
@@ -15,14 +15,14 @@
#include "includes.h"
#include "common.h"
-#include "sha256.h"
#include "base64.h"
-#include "common/ieee802_11_defs.h"
#include "eloop.h"
+#include "crypto/crypto.h"
+#include "crypto/sha256.h"
+#include "common/ieee802_11_defs.h"
#include "wps_i.h"
#include "wps_dev_attr.h"
#include "wps_upnp.h"
-#include "crypto.h"
#include "uuid.h"
#define WPS_WORKAROUNDS