diff --git a/src/rsn_supp/pmksa_cache.c b/src/rsn_supp/pmksa_cache.c index ed33dbae8..f90dcd9b0 100644 --- a/src/rsn_supp/pmksa_cache.c +++ b/src/rsn_supp/pmksa_cache.c @@ -851,4 +851,99 @@ void pmksa_cache_reconfig(struct rsn_pmksa_cache *pmksa) } } +#else /* IEEE8021X_EAPOL */ + +struct rsn_pmksa_cache * +pmksa_cache_init(void (*free_cb)(struct rsn_pmksa_cache_entry *entry, + void *ctx, enum pmksa_free_reason reason), + bool (*is_current_cb)(struct rsn_pmksa_cache_entry *entry, + void *ctx), + void (*notify_cb)(struct rsn_pmksa_cache_entry *entry, + void *ctx), + void *ctx, struct wpa_sm *sm) +{ + return (void *) -1; +} + + +void pmksa_cache_deinit(struct rsn_pmksa_cache *pmksa) +{ +} + + +struct rsn_pmksa_cache_entry * +pmksa_cache_get(struct rsn_pmksa_cache *pmksa, const u8 *aa, const u8 *spa, + const u8 *pmkid, const void *network_ctx, int akmp) +{ + return NULL; +} + + +struct rsn_pmksa_cache_entry * +pmksa_cache_get_current(struct wpa_sm *sm) +{ + return NULL; +} + + +int pmksa_cache_list(struct rsn_pmksa_cache *pmksa, char *buf, size_t len) +{ + return -1; +} + + +struct rsn_pmksa_cache_entry * +pmksa_cache_head(struct rsn_pmksa_cache *pmksa) +{ + return NULL; +} + + +struct rsn_pmksa_cache_entry * +pmksa_cache_add_entry(struct rsn_pmksa_cache *pmksa, + struct rsn_pmksa_cache_entry *entry) +{ + return NULL; +} + + +struct rsn_pmksa_cache_entry * +pmksa_cache_add(struct rsn_pmksa_cache *pmksa, const u8 *pmk, size_t pmk_len, + const u8 *pmkid, const u8 *kck, size_t kck_len, + const u8 *aa, const u8 *spa, void *network_ctx, int akmp, + const u8 *cache_id) +{ + return NULL; +} + + +void pmksa_cache_clear_current(struct wpa_sm *sm) +{ +} + + +int pmksa_cache_set_current(struct wpa_sm *sm, const u8 *pmkid, const u8 *bssid, + void *network_ctx, int try_opportunistic, + const u8 *fils_cache_id, int akmp, bool associated) +{ + return -1; +} + + +void pmksa_cache_flush(struct rsn_pmksa_cache *pmksa, void *network_ctx, + const u8 *pmk, size_t pmk_len, bool external_only) +{ +} + + +void pmksa_cache_remove(struct rsn_pmksa_cache *pmksa, + struct rsn_pmksa_cache_entry *entry) +{ +} + + +void pmksa_cache_reconfig(struct rsn_pmksa_cache *pmksa) +{ +} + #endif /* IEEE8021X_EAPOL */ diff --git a/src/rsn_supp/pmksa_cache.h b/src/rsn_supp/pmksa_cache.h index 6ba48f746..b1203ad2f 100644 --- a/src/rsn_supp/pmksa_cache.h +++ b/src/rsn_supp/pmksa_cache.h @@ -64,8 +64,6 @@ enum pmksa_free_reason { PMKSA_EXPIRE, }; -#if defined(IEEE8021X_EAPOL) && !defined(CONFIG_NO_WPA) - struct rsn_pmksa_cache * pmksa_cache_init(void (*free_cb)(struct rsn_pmksa_cache_entry *entry, void *ctx, enum pmksa_free_reason reason), @@ -105,95 +103,4 @@ void pmksa_cache_remove(struct rsn_pmksa_cache *pmksa, struct rsn_pmksa_cache_entry *entry); void pmksa_cache_reconfig(struct rsn_pmksa_cache *pmksa); -#else /* IEEE8021X_EAPOL */ - -static inline struct rsn_pmksa_cache * -pmksa_cache_init(void (*free_cb)(struct rsn_pmksa_cache_entry *entry, - void *ctx, enum pmksa_free_reason reason), - bool (*is_current_cb)(struct rsn_pmksa_cache_entry *entry, - void *ctx), - void (*notify_cb)(struct rsn_pmksa_cache_entry *entry, - void *ctx), - void *ctx, struct wpa_sm *sm) -{ - return (void *) -1; -} - -static inline void pmksa_cache_deinit(struct rsn_pmksa_cache *pmksa) -{ -} - -static inline struct rsn_pmksa_cache_entry * -pmksa_cache_get(struct rsn_pmksa_cache *pmksa, const u8 *aa, const u8 *spa, - const u8 *pmkid, const void *network_ctx, int akmp) -{ - return NULL; -} - -static inline struct rsn_pmksa_cache_entry * -pmksa_cache_get_current(struct wpa_sm *sm) -{ - return NULL; -} - -static inline int pmksa_cache_list(struct rsn_pmksa_cache *pmksa, char *buf, - size_t len) -{ - return -1; -} - -static inline struct rsn_pmksa_cache_entry * -pmksa_cache_head(struct rsn_pmksa_cache *pmksa) -{ - return NULL; -} - -static inline struct rsn_pmksa_cache_entry * -pmksa_cache_add_entry(struct rsn_pmksa_cache *pmksa, - struct rsn_pmksa_cache_entry *entry) -{ - return NULL; -} - -static inline struct rsn_pmksa_cache_entry * -pmksa_cache_add(struct rsn_pmksa_cache *pmksa, const u8 *pmk, size_t pmk_len, - const u8 *pmkid, const u8 *kck, size_t kck_len, - const u8 *aa, const u8 *spa, void *network_ctx, int akmp, - const u8 *cache_id) -{ - return NULL; -} - -static inline void pmksa_cache_clear_current(struct wpa_sm *sm) -{ -} - -static inline int pmksa_cache_set_current(struct wpa_sm *sm, const u8 *pmkid, - const u8 *bssid, - void *network_ctx, - int try_opportunistic, - const u8 *fils_cache_id, - int akmp, bool associated) -{ - return -1; -} - -static inline void pmksa_cache_flush(struct rsn_pmksa_cache *pmksa, - void *network_ctx, - const u8 *pmk, size_t pmk_len, - bool external_only) -{ -} - -static inline void pmksa_cache_remove(struct rsn_pmksa_cache *pmksa, - struct rsn_pmksa_cache_entry *entry) -{ -} - -static inline void pmksa_cache_reconfig(struct rsn_pmksa_cache *pmksa) -{ -} - -#endif /* IEEE8021X_EAPOL */ - #endif /* PMKSA_CACHE_H */ diff --git a/tests/fuzzing/pasn-init/Makefile b/tests/fuzzing/pasn-init/Makefile index b848f271e..d838192a4 100644 --- a/tests/fuzzing/pasn-init/Makefile +++ b/tests/fuzzing/pasn-init/Makefile @@ -26,6 +26,7 @@ OBJS += $(SRC)/crypto/sha384-prf.o OBJS += $(SRC)/crypto/sha256-kdf.o OBJS += $(SRC)/crypto/sha384-kdf.o OBJS += $(SRC)/rsn_supp/wpa_ie.o +OBJS += $(SRC)/rsn_supp/pmksa_cache.o OBJS += $(SRC)/pasn/pasn_initiator.o OBJS += pasn-init.o diff --git a/wpa_supplicant/Android.mk b/wpa_supplicant/Android.mk index fd03f389c..15bea394f 100644 --- a/wpa_supplicant/Android.mk +++ b/wpa_supplicant/Android.mk @@ -101,6 +101,7 @@ OBJS += src/utils/bitfield.c OBJS += src/utils/ip_addr.c OBJS += src/utils/crc32.c OBJS += src/common/ptksa_cache.c +OBJS += src/rsn_supp/pmksa_cache.c OBJS += twt.c OBJS_p = wpa_passphrase.c OBJS_p += src/utils/common.c @@ -337,7 +338,6 @@ endif ifndef CONFIG_NO_WPA OBJS += src/rsn_supp/wpa.c OBJS += src/rsn_supp/preauth.c -OBJS += src/rsn_supp/pmksa_cache.c OBJS += src/rsn_supp/wpa_ie.c OBJS += src/common/wpa_common.c NEED_AES=y @@ -1802,8 +1802,9 @@ endif PASNOBJS += src/common/ptksa_cache.c -ifndef CONFIG_NO_WPA PASNOBJS += src/rsn_supp/pmksa_cache.c + +ifndef CONFIG_NO_WPA PASNOBJS += src/rsn_supp/wpa_ie.c endif diff --git a/wpa_supplicant/Makefile b/wpa_supplicant/Makefile index 9230787a4..0ec08e8cf 100644 --- a/wpa_supplicant/Makefile +++ b/wpa_supplicant/Makefile @@ -113,6 +113,7 @@ OBJS += ../src/utils/bitfield.o OBJS += ../src/utils/ip_addr.o OBJS += ../src/utils/crc32.o OBJS += ../src/common/ptksa_cache.o +OBJS += ../src/rsn_supp/pmksa_cache.o OBJS += twt.o OBJS_p = wpa_passphrase.o OBJS_p += ../src/utils/common.o @@ -371,7 +372,6 @@ endif ifndef CONFIG_NO_WPA OBJS += ../src/rsn_supp/wpa.o OBJS += ../src/rsn_supp/preauth.o -OBJS += ../src/rsn_supp/pmksa_cache.o OBJS += ../src/rsn_supp/wpa_ie.o OBJS += ../src/common/wpa_common.o NEED_AES=y @@ -2222,9 +2222,9 @@ LIBPASNSO += ../src/common/dragonfly.c endif LIBPASNSO += ../src/common/ptksa_cache.c +LIBPASNSO += ../src/rsn_supp/pmksa_cache.c ifndef CONFIG_NO_WPA -LIBPASNSO += ../src/rsn_supp/pmksa_cache.c LIBPASNSO += ../src/rsn_supp/wpa_ie.c endif