Fix CONFIG_NO_WPA=y build

Number of places were calling functions that are not included in
CONFIG_NO_WPA=y build anymore. Comment out such calls. In addition, pull
in SHA1 and MD5 for config_internal.c, if needed.

Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2015-11-23 23:34:52 +02:00
parent eb926f1257
commit 9e68742ef1
5 changed files with 21 additions and 3 deletions

View file

@ -181,7 +181,7 @@ static inline void wpa_sm_notify_disassoc(struct wpa_sm *sm)
}
static inline void wpa_sm_set_pmk(struct wpa_sm *sm, const u8 *pmk,
size_t pmk_len)
size_t pmk_len, const u8 *bssid)
{
}
@ -321,7 +321,8 @@ static inline void wpa_sm_set_rx_replay_ctr(struct wpa_sm *sm,
}
static inline void wpa_sm_set_ptk_kck_kek(struct wpa_sm *sm, const u8 *ptk_kck,
const u8 *ptk_kek)
size_t ptk_kck_len,
const u8 *ptk_kek, size_t ptk_kek_len)
{
}

View file

@ -288,6 +288,10 @@ NEED_MD5=y
NEED_RC4=y
else
CFLAGS += -DCONFIG_NO_WPA
ifeq ($(CONFIG_TLS), internal)
NEED_SHA1=y
NEED_MD5=y
endif
endif
ifdef CONFIG_IBSS_RSN

View file

@ -899,6 +899,9 @@ static char * wpa_config_write_key_mgmt(const struct parse_data *data,
static int wpa_config_parse_cipher(int line, const char *value)
{
#ifdef CONFIG_NO_WPA
return -1;
#else /* CONFIG_NO_WPA */
int val = wpa_parse_cipher(value);
if (val < 0) {
wpa_printf(MSG_ERROR, "Line %d: invalid cipher '%s'.",
@ -911,12 +914,16 @@ static int wpa_config_parse_cipher(int line, const char *value)
return -1;
}
return val;
#endif /* CONFIG_NO_WPA */
}
#ifndef NO_CONFIG_WRITE
static char * wpa_config_write_cipher(int cipher)
{
#ifdef CONFIG_NO_WPA
return NULL;
#else /* CONFIG_NO_WPA */
char *buf = os_zalloc(50);
if (buf == NULL)
return NULL;
@ -927,6 +934,7 @@ static char * wpa_config_write_cipher(int cipher)
}
return buf;
#endif /* CONFIG_NO_WPA */
}
#endif /* NO_CONFIG_WRITE */

View file

@ -1155,6 +1155,10 @@ int wpa_supplicant_set_suites(struct wpa_supplicant *wpa_s,
return -1;
}
#ifdef CONFIG_NO_WPA
wpa_s->group_cipher = WPA_CIPHER_NONE;
wpa_s->pairwise_cipher = WPA_CIPHER_NONE;
#else /* CONFIG_NO_WPA */
sel = ie.group_cipher & ssid->group_cipher;
wpa_s->group_cipher = wpa_pick_group_cipher(sel);
if (wpa_s->group_cipher < 0) {
@ -1174,6 +1178,7 @@ int wpa_supplicant_set_suites(struct wpa_supplicant *wpa_s,
}
wpa_dbg(wpa_s, MSG_DEBUG, "WPA: using PTK %s",
wpa_cipher_txt(wpa_s->pairwise_cipher));
#endif /* CONFIG_NO_WPA */
sel = ie.key_mgmt & ssid->key_mgmt;
#ifdef CONFIG_SAE

View file

@ -1013,7 +1013,6 @@ static void wpa_supplicant_set_rekey_offload(void *ctx,
wpa_drv_set_rekey_info(wpa_s, kek, kek_len, kck, kck_len, replay_ctr);
}
#endif /* CONFIG_NO_WPA */
static int wpa_supplicant_key_mgmt_set_pmk(void *ctx, const u8 *pmk,
@ -1028,6 +1027,7 @@ static int wpa_supplicant_key_mgmt_set_pmk(void *ctx, const u8 *pmk,
else
return 0;
}
#endif /* CONFIG_NO_WPA */
int wpa_supplicant_init_wpa(struct wpa_supplicant *wpa_s)