]> git.ipfire.org Git - thirdparty/hostap.git/blame - src/ap/wpa_auth.h
Fix potential memory leak with identity/radius_cui
[thirdparty/hostap.git] / src / ap / wpa_auth.h
CommitLineData
6fc6879b
JM
1/*
2 * hostapd - IEEE 802.11i-2004 / WPA Authenticator
09368515 3 * Copyright (c) 2004-2017, Jouni Malinen <j@w1.fi>
6fc6879b 4 *
0f3d578e
JM
5 * This software may be distributed under the terms of the BSD license.
6 * See README for more details.
6fc6879b
JM
7 */
8
9#ifndef WPA_AUTH_H
10#define WPA_AUTH_H
11
90973fb2
JM
12#include "common/defs.h"
13#include "common/eapol_common.h"
14#include "common/wpa_common.h"
d6c3067d 15#include "common/ieee802_11_defs.h"
6fc6879b 16
47a039b0
MB
17struct vlan_description;
18
bc02843e
JM
19#define MAX_OWN_IE_OVERRIDE 256
20
6fc6879b
JM
21#ifdef _MSC_VER
22#pragma pack(push, 1)
23#endif /* _MSC_VER */
24
c1e033b0
JM
25/* IEEE Std 802.11r-2008, 11A.10.3 - Remote request/response frame definition
26 */
6fc6879b
JM
27struct ft_rrb_frame {
28 u8 frame_type; /* RSN_REMOTE_FRAME_TYPE_FT_RRB */
29 u8 packet_type; /* FT_PACKET_REQUEST/FT_PACKET_RESPONSE */
2eba45c8 30 le16 action_length; /* little endian length of action_frame */
6fc6879b
JM
31 u8 ap_address[ETH_ALEN];
32 /*
33 * Followed by action_length bytes of FT Action frame (from Category
34 * field to the end of Action Frame body.
35 */
36} STRUCT_PACKED;
37
38#define RSN_REMOTE_FRAME_TYPE_FT_RRB 1
39
40#define FT_PACKET_REQUEST 0
41#define FT_PACKET_RESPONSE 1
50bd8e0a
MB
42
43/* Vendor-specific types for R0KH-R1KH protocol; not defined in 802.11r. These
44 * use OUI Extended EtherType as the encapsulating format. */
45#define FT_PACKET_R0KH_R1KH_PULL 0x01
46#define FT_PACKET_R0KH_R1KH_RESP 0x02
47#define FT_PACKET_R0KH_R1KH_PUSH 0x03
eefe8630
MB
48#define FT_PACKET_R0KH_R1KH_SEQ_REQ 0x04
49#define FT_PACKET_R0KH_R1KH_SEQ_RESP 0x05
6fc6879b 50
245fc96e
MB
51/* packet layout
52 * IEEE 802 extended OUI ethertype frame header
53 * u16 authlen (little endian)
54 * multiple of struct ft_rrb_tlv (authenticated only, length = authlen)
55 * multiple of struct ft_rrb_tlv (AES-SIV encrypted, AES-SIV needs an extra
56 * blocksize length)
57 *
58 * AES-SIV AAD;
59 * source MAC address (6)
60 * authenticated-only TLVs (authlen)
61 * subtype (1; FT_PACKET_*)
62 */
6fc6879b 63
245fc96e
MB
64#define FT_RRB_NONCE_LEN 16
65
66#define FT_RRB_LAST_EMPTY 0 /* placeholder or padding */
67
eefe8630 68#define FT_RRB_SEQ 1 /* struct ft_rrb_seq */
245fc96e
MB
69#define FT_RRB_NONCE 2 /* size FT_RRB_NONCE_LEN */
70#define FT_RRB_TIMESTAMP 3 /* le32 unix seconds */
71
72#define FT_RRB_R0KH_ID 4 /* FT_R0KH_ID_MAX_LEN */
73#define FT_RRB_R1KH_ID 5 /* FT_R1KH_ID_LEN */
74#define FT_RRB_S1KH_ID 6 /* ETH_ALEN */
6fc6879b 75
245fc96e
MB
76#define FT_RRB_PMK_R0_NAME 7 /* WPA_PMK_NAME_LEN */
77#define FT_RRB_PMK_R0 8 /* PMK_LEN */
78#define FT_RRB_PMK_R1_NAME 9 /* WPA_PMK_NAME_LEN */
79#define FT_RRB_PMK_R1 10 /* PMK_LEN */
80
81#define FT_RRB_PAIRWISE 11 /* le16 */
3a3e2832 82#define FT_RRB_EXPIRES_IN 12 /* le16 seconds */
245fc96e 83
17010c38
MB
84#define FT_RRB_VLAN_UNTAGGED 13 /* le16 */
85#define FT_RRB_VLAN_TAGGED 14 /* n times le16 */
86
245fc96e
MB
87struct ft_rrb_tlv {
88 le16 type;
89 le16 len;
90 /* followed by data of length len */
6fc6879b
JM
91} STRUCT_PACKED;
92
eefe8630
MB
93struct ft_rrb_seq {
94 le32 dom;
95 le32 seq;
96 le32 ts;
97} STRUCT_PACKED;
98
245fc96e
MB
99/* session TLVs:
100 * required: PMK_R1, PMK_R1_NAME, PAIRWISE
17010c38 101 * optional: VLAN_UNTAGGED, VLAN_TAGGED, EXPIRES_IN
245fc96e
MB
102 *
103 * pull frame TLVs:
104 * auth:
eefe8630 105 * required: SEQ, NONCE, R0KH_ID, R1KH_ID
245fc96e
MB
106 * encrypted:
107 * required: PMK_R0_NAME, S1KH_ID
108 *
109 * response frame TLVs:
110 * auth:
eefe8630 111 * required: SEQ, NONCE, R0KH_ID, R1KH_ID
245fc96e 112 * encrypted:
3a46cf93
MB
113 * required: S1KH_ID
114 * optional: session TLVs
245fc96e
MB
115 *
116 * push frame TLVs:
117 * auth:
eefe8630 118 * required: SEQ, R0KH_ID, R1KH_ID
245fc96e
MB
119 * encrypted:
120 * required: S1KH_ID, PMK_R0_NAME, session TLVs
eefe8630
MB
121 *
122 * sequence number request frame TLVs:
123 * auth:
124 * required: R0KH_ID, R1KH_ID, NONCE
125 *
126 * sequence number response frame TLVs:
127 * auth:
128 * required: SEQ, NONCE, R0KH_ID, R1KH_ID
245fc96e
MB
129 */
130
6fc6879b
JM
131#ifdef _MSC_VER
132#pragma pack(pop)
133#endif /* _MSC_VER */
134
135
136/* per STA state machine data */
137
138struct wpa_authenticator;
139struct wpa_state_machine;
140struct rsn_pmksa_cache_entry;
141struct eapol_state_machine;
eefe8630 142struct ft_remote_seq;
6fc6879b
JM
143
144
145struct ft_remote_r0kh {
146 struct ft_remote_r0kh *next;
147 u8 addr[ETH_ALEN];
148 u8 id[FT_R0KH_ID_MAX_LEN];
149 size_t id_len;
245fc96e 150 u8 key[32];
eefe8630 151 struct ft_remote_seq *seq;
6fc6879b
JM
152};
153
154
155struct ft_remote_r1kh {
156 struct ft_remote_r1kh *next;
157 u8 addr[ETH_ALEN];
158 u8 id[FT_R1KH_ID_LEN];
245fc96e 159 u8 key[32];
eefe8630 160 struct ft_remote_seq *seq;
6fc6879b
JM
161};
162
163
164struct wpa_auth_config {
165 int wpa;
166 int wpa_key_mgmt;
167 int wpa_pairwise;
168 int wpa_group;
169 int wpa_group_rekey;
170 int wpa_strict_rekey;
171 int wpa_gmk_rekey;
581a8cde 172 int wpa_ptk_rekey;
41f140d3
GK
173 u32 wpa_group_update_count;
174 u32 wpa_pairwise_update_count;
6f234c1e 175 int wpa_disable_eapol_key_retries;
6fc6879b
JM
176 int rsn_pairwise;
177 int rsn_preauth;
178 int eapol_version;
3ae0800c 179 int wmm_enabled;
721abef9 180 int wmm_uapsd;
cb465555 181 int disable_pmksa_caching;
bf98f7f3 182 int okc;
e4bf4db9 183 int tx_status;
6fc6879b 184#ifdef CONFIG_IEEE80211W
70f8cc8e 185 enum mfp_options ieee80211w;
8dd9f9cd 186 int group_mgmt_cipher;
ba3d435f 187 int sae_require_mfp;
6fc6879b 188#endif /* CONFIG_IEEE80211W */
4ec1fd8e 189#ifdef CONFIG_IEEE80211R_AP
d6c3067d 190 u8 ssid[SSID_MAX_LEN];
6fc6879b
JM
191 size_t ssid_len;
192 u8 mobility_domain[MOBILITY_DOMAIN_ID_LEN];
193 u8 r0_key_holder[FT_R0KH_ID_MAX_LEN];
194 size_t r0_key_holder_len;
195 u8 r1_key_holder[FT_R1KH_ID_LEN];
83fe4bd3 196 u32 r0_key_lifetime; /* PMK-R0 lifetime seconds */
3a46cf93
MB
197 int rkh_pos_timeout;
198 int rkh_neg_timeout;
199 int rkh_pull_timeout; /* ms */
200 int rkh_pull_retries;
3a3e2832 201 int r1_max_key_lifetime;
6fc6879b 202 u32 reassociation_deadline;
3a46cf93
MB
203 struct ft_remote_r0kh **r0kh_list;
204 struct ft_remote_r1kh **r1kh_list;
6fc6879b 205 int pmk_r1_push;
d7956add 206 int ft_over_ds;
96590564 207 int ft_psk_generate_local;
4ec1fd8e 208#endif /* CONFIG_IEEE80211R_AP */
83421850 209 int disable_gtk;
88b32a99 210 int ap_mlme;
7af092a0
JB
211#ifdef CONFIG_TESTING_OPTIONS
212 double corrupt_gtk_rekey_mic_probability;
bc02843e
JM
213 u8 own_ie_override[MAX_OWN_IE_OVERRIDE];
214 size_t own_ie_override_len;
7af092a0 215#endif /* CONFIG_TESTING_OPTIONS */
25ef8529
JM
216#ifdef CONFIG_P2P
217 u8 ip_addr_go[4];
218 u8 ip_addr_mask[4];
219 u8 ip_addr_start[4];
220 u8 ip_addr_end[4];
221#endif /* CONFIG_P2P */
7eace378
JM
222#ifdef CONFIG_FILS
223 unsigned int fils_cache_id_set:1;
224 u8 fils_cache_id[FILS_CACHE_ID_LEN];
225#endif /* CONFIG_FILS */
6fc6879b
JM
226};
227
228typedef enum {
229 LOGGER_DEBUG, LOGGER_INFO, LOGGER_WARNING
230} logger_level;
231
232typedef enum {
233 WPA_EAPOL_portEnabled, WPA_EAPOL_portValid, WPA_EAPOL_authorized,
234 WPA_EAPOL_portControl_Auto, WPA_EAPOL_keyRun, WPA_EAPOL_keyAvailable,
235 WPA_EAPOL_keyDone, WPA_EAPOL_inc_EapolFramesTx
236} wpa_eapol_variable;
237
238struct wpa_auth_callbacks {
6fc6879b
JM
239 void (*logger)(void *ctx, const u8 *addr, logger_level level,
240 const char *txt);
241 void (*disconnect)(void *ctx, const u8 *addr, u16 reason);
c772d054 242 int (*mic_failure_report)(void *ctx, const u8 *addr);
2c502460 243 void (*psk_failure_report)(void *ctx, const u8 *addr);
6fc6879b
JM
244 void (*set_eapol)(void *ctx, const u8 *addr, wpa_eapol_variable var,
245 int value);
246 int (*get_eapol)(void *ctx, const u8 *addr, wpa_eapol_variable var);
759fd76b 247 const u8 * (*get_psk)(void *ctx, const u8 *addr, const u8 *p2p_dev_addr,
7a12edd1 248 const u8 *prev_psk, size_t *psk_len);
6fc6879b 249 int (*get_msk)(void *ctx, const u8 *addr, u8 *msk, size_t *len);
71934751
JM
250 int (*set_key)(void *ctx, int vlan_id, enum wpa_alg alg,
251 const u8 *addr, int idx, u8 *key, size_t key_len);
6fc6879b 252 int (*get_seqnum)(void *ctx, const u8 *addr, int idx, u8 *seq);
6fc6879b
JM
253 int (*send_eapol)(void *ctx, const u8 *addr, const u8 *data,
254 size_t data_len, int encrypt);
255 int (*for_each_sta)(void *ctx, int (*cb)(struct wpa_state_machine *sm,
256 void *ctx), void *cb_ctx);
bf98f7f3
JM
257 int (*for_each_auth)(void *ctx, int (*cb)(struct wpa_authenticator *a,
258 void *ctx), void *cb_ctx);
6fc6879b
JM
259 int (*send_ether)(void *ctx, const u8 *dst, u16 proto, const u8 *data,
260 size_t data_len);
50bd8e0a
MB
261 int (*send_oui)(void *ctx, const u8 *dst, u8 oui_suffix, const u8 *data,
262 size_t data_len);
4ec1fd8e 263#ifdef CONFIG_IEEE80211R_AP
6fc6879b 264 struct wpa_state_machine * (*add_sta)(void *ctx, const u8 *sta_addr);
47a039b0
MB
265 int (*set_vlan)(void *ctx, const u8 *sta_addr,
266 struct vlan_description *vlan);
267 int (*get_vlan)(void *ctx, const u8 *sta_addr,
268 struct vlan_description *vlan);
6fc6879b
JM
269 int (*send_ft_action)(void *ctx, const u8 *dst,
270 const u8 *data, size_t data_len);
88b32a99 271 int (*add_tspec)(void *ctx, const u8 *sta_addr, u8 *tspec_ie,
006309b5 272 size_t tspec_ielen);
4ec1fd8e 273#endif /* CONFIG_IEEE80211R_AP */
0f950df0
TP
274#ifdef CONFIG_MESH
275 int (*start_ampe)(void *ctx, const u8 *sta_addr);
276#endif /* CONFIG_MESH */
6fc6879b
JM
277};
278
279struct wpa_authenticator * wpa_init(const u8 *addr,
280 struct wpa_auth_config *conf,
cef8fac0
JB
281 const struct wpa_auth_callbacks *cb,
282 void *cb_ctx);
bdffdc5d 283int wpa_init_keys(struct wpa_authenticator *wpa_auth);
6fc6879b
JM
284void wpa_deinit(struct wpa_authenticator *wpa_auth);
285int wpa_reconfig(struct wpa_authenticator *wpa_auth,
286 struct wpa_auth_config *conf);
287
288enum {
289 WPA_IE_OK, WPA_INVALID_IE, WPA_INVALID_GROUP, WPA_INVALID_PAIRWISE,
290 WPA_INVALID_AKMP, WPA_NOT_ENABLED, WPA_ALLOC_FAIL,
291 WPA_MGMT_FRAME_PROTECTION_VIOLATION, WPA_INVALID_MGMT_GROUP_CIPHER,
567da5bb 292 WPA_INVALID_MDIE, WPA_INVALID_PROTO, WPA_INVALID_PMKID
6fc6879b 293};
91d91abf 294
6fc6879b
JM
295int wpa_validate_wpa_ie(struct wpa_authenticator *wpa_auth,
296 struct wpa_state_machine *sm,
297 const u8 *wpa_ie, size_t wpa_ie_len,
09368515
JM
298 const u8 *mdie, size_t mdie_len,
299 const u8 *owe_dh, size_t owe_dh_len);
a14896e8
JM
300int wpa_validate_osen(struct wpa_authenticator *wpa_auth,
301 struct wpa_state_machine *sm,
302 const u8 *osen_ie, size_t osen_ie_len);
f3f7540e 303int wpa_auth_uses_mfp(struct wpa_state_machine *sm);
6fc6879b 304struct wpa_state_machine *
94ddef3e
JM
305wpa_auth_sta_init(struct wpa_authenticator *wpa_auth, const u8 *addr,
306 const u8 *p2p_dev_addr);
6f9b5d16
JM
307int wpa_auth_sta_associated(struct wpa_authenticator *wpa_auth,
308 struct wpa_state_machine *sm);
a8d05fca 309void wpa_auth_sta_no_wpa(struct wpa_state_machine *sm);
6fc6879b
JM
310void wpa_auth_sta_deinit(struct wpa_state_machine *sm);
311void wpa_receive(struct wpa_authenticator *wpa_auth,
312 struct wpa_state_machine *sm,
313 u8 *data, size_t data_len);
bb119228 314enum wpa_event {
6fc6879b 315 WPA_AUTH, WPA_ASSOC, WPA_DISASSOC, WPA_DEAUTH, WPA_REAUTH,
0e3bd7ac 316 WPA_REAUTH_EAPOL, WPA_ASSOC_FT, WPA_ASSOC_FILS, WPA_DRV_STA_REMOVED
bb119228 317};
6fc6879b 318void wpa_remove_ptk(struct wpa_state_machine *sm);
bb119228 319int wpa_auth_sm_event(struct wpa_state_machine *sm, enum wpa_event event);
6fc6879b
JM
320void wpa_auth_sm_notify(struct wpa_state_machine *sm);
321void wpa_gtk_rekey(struct wpa_authenticator *wpa_auth);
322int wpa_get_mib(struct wpa_authenticator *wpa_auth, char *buf, size_t buflen);
323int wpa_get_mib_sta(struct wpa_state_machine *sm, char *buf, size_t buflen);
324void wpa_auth_countermeasures_start(struct wpa_authenticator *wpa_auth);
325int wpa_auth_pairwise_set(struct wpa_state_machine *sm);
ff36ff00 326int wpa_auth_get_pairwise(struct wpa_state_machine *sm);
6fc6879b
JM
327int wpa_auth_sta_key_mgmt(struct wpa_state_machine *sm);
328int wpa_auth_sta_wpa_version(struct wpa_state_machine *sm);
0e3bd7ac 329int wpa_auth_sta_ft_tk_already_set(struct wpa_state_machine *sm);
2f1357fb 330int wpa_auth_sta_fils_tk_already_set(struct wpa_state_machine *sm);
6fc6879b
JM
331int wpa_auth_sta_clear_pmksa(struct wpa_state_machine *sm,
332 struct rsn_pmksa_cache_entry *entry);
333struct rsn_pmksa_cache_entry *
334wpa_auth_sta_get_pmksa(struct wpa_state_machine *sm);
335void wpa_auth_sta_local_mic_failure_report(struct wpa_state_machine *sm);
336const u8 * wpa_auth_get_wpa_ie(struct wpa_authenticator *wpa_auth,
337 size_t *len);
338int wpa_auth_pmksa_add(struct wpa_state_machine *sm, const u8 *pmk,
207976f0 339 unsigned int pmk_len,
6fc6879b
JM
340 int session_timeout, struct eapol_state_machine *eapol);
341int wpa_auth_pmksa_add_preauth(struct wpa_authenticator *wpa_auth,
342 const u8 *pmk, size_t len, const u8 *sta_addr,
343 int session_timeout,
344 struct eapol_state_machine *eapol);
f2991170 345int wpa_auth_pmksa_add_sae(struct wpa_authenticator *wpa_auth, const u8 *addr,
70c93963 346 const u8 *pmk, const u8 *pmkid);
9d94e4bb 347void wpa_auth_add_sae_pmkid(struct wpa_state_machine *sm, const u8 *pmkid);
0c52953b
JM
348int wpa_auth_pmksa_add2(struct wpa_authenticator *wpa_auth, const u8 *addr,
349 const u8 *pmk, size_t pmk_len, const u8 *pmkid,
350 int session_timeout, int akmp);
901d1fe1
JM
351void wpa_auth_pmksa_remove(struct wpa_authenticator *wpa_auth,
352 const u8 *sta_addr);
b8daac18
MH
353int wpa_auth_pmksa_list(struct wpa_authenticator *wpa_auth, char *buf,
354 size_t len);
4c522c77 355void wpa_auth_pmksa_flush(struct wpa_authenticator *wpa_auth);
4d77d80e
MH
356int wpa_auth_pmksa_list_mesh(struct wpa_authenticator *wpa_auth, const u8 *addr,
357 char *buf, size_t len);
358struct rsn_pmksa_cache_entry *
359wpa_auth_pmksa_create_entry(const u8 *aa, const u8 *spa, const u8 *pmk,
360 const u8 *pmkid, int expiration);
361int wpa_auth_pmksa_add_entry(struct wpa_authenticator *wpa_auth,
362 struct rsn_pmksa_cache_entry *entry);
9f2cf23e 363struct rsn_pmksa_cache_entry *
c1bd4bac
JM
364wpa_auth_pmksa_get(struct wpa_authenticator *wpa_auth, const u8 *sta_addr,
365 const u8 *pmkid);
7eace378
JM
366struct rsn_pmksa_cache_entry *
367wpa_auth_pmksa_get_fils_cache_id(struct wpa_authenticator *wpa_auth,
368 const u8 *sta_addr, const u8 *pmkid);
9f2cf23e
MH
369void wpa_auth_pmksa_set_to_sm(struct rsn_pmksa_cache_entry *pmksa,
370 struct wpa_state_machine *sm,
371 struct wpa_authenticator *wpa_auth,
372 u8 *pmkid, u8 *pmk);
6fc6879b 373int wpa_auth_sta_set_vlan(struct wpa_state_machine *sm, int vlan_id);
e4bf4db9
JM
374void wpa_auth_eapol_key_tx_status(struct wpa_authenticator *wpa_auth,
375 struct wpa_state_machine *sm, int ack);
6fc6879b 376
4ec1fd8e 377#ifdef CONFIG_IEEE80211R_AP
6fc6879b 378u8 * wpa_sm_write_assoc_resp_ies(struct wpa_state_machine *sm, u8 *pos,
f238cf9f
JM
379 size_t max_len, int auth_alg,
380 const u8 *req_ies, size_t req_ies_len);
6fc6879b
JM
381void wpa_ft_process_auth(struct wpa_state_machine *sm, const u8 *bssid,
382 u16 auth_transaction, const u8 *ies, size_t ies_len,
383 void (*cb)(void *ctx, const u8 *dst, const u8 *bssid,
384 u16 auth_transaction, u16 resp,
385 const u8 *ies, size_t ies_len),
386 void *ctx);
387u16 wpa_ft_validate_reassoc(struct wpa_state_machine *sm, const u8 *ies,
388 size_t ies_len);
389int wpa_ft_action_rx(struct wpa_state_machine *sm, const u8 *data, size_t len);
390int wpa_ft_rrb_rx(struct wpa_authenticator *wpa_auth, const u8 *src_addr,
391 const u8 *data, size_t data_len);
50bd8e0a
MB
392void wpa_ft_rrb_oui_rx(struct wpa_authenticator *wpa_auth, const u8 *src_addr,
393 const u8 *dst_addr, u8 oui_suffix, const u8 *data,
394 size_t data_len);
6fc6879b 395void wpa_ft_push_pmk_r1(struct wpa_authenticator *wpa_auth, const u8 *addr);
eefe8630 396void wpa_ft_deinit(struct wpa_authenticator *wpa_auth);
3a46cf93 397void wpa_ft_sta_deinit(struct wpa_state_machine *sm);
4ec1fd8e 398#endif /* CONFIG_IEEE80211R_AP */
6fc6879b 399
d32d94db
XC
400void wpa_wnmsleep_rekey_gtk(struct wpa_state_machine *sm);
401void wpa_set_wnmsleep(struct wpa_state_machine *sm, int flag);
402int wpa_wnmsleep_gtk_subelem(struct wpa_state_machine *sm, u8 *pos);
d32d94db 403int wpa_wnmsleep_igtk_subelem(struct wpa_state_machine *sm, u8 *pos);
d32d94db 404
c10347f2 405int wpa_auth_uses_sae(struct wpa_state_machine *sm);
aa189ac9 406int wpa_auth_uses_ft_sae(struct wpa_state_machine *sm);
c10347f2 407
25ef8529
JM
408int wpa_auth_get_ip_addr(struct wpa_state_machine *sm, u8 *addr);
409
cbc210de
JM
410struct radius_das_attrs;
411int wpa_auth_radius_das_disconnect_pmksa(struct wpa_authenticator *wpa_auth,
412 struct radius_das_attrs *attr);
34782730 413void wpa_auth_reconfig_group_keys(struct wpa_authenticator *wpa_auth);
cbc210de 414
7cebc8e2
MB
415int wpa_auth_ensure_group(struct wpa_authenticator *wpa_auth, int vlan_id);
416int wpa_auth_release_group(struct wpa_authenticator *wpa_auth, int vlan_id);
c4fd6d8a 417int fils_auth_pmk_to_ptk(struct wpa_state_machine *sm, const u8 *pmk,
80ddf5d9 418 size_t pmk_len, const u8 *snonce, const u8 *anonce,
4cada9dc 419 const u8 *dhss, size_t dhss_len,
80ddf5d9 420 struct wpabuf *g_sta, struct wpabuf *g_ap);
78815f3d
JM
421int fils_decrypt_assoc(struct wpa_state_machine *sm, const u8 *fils_session,
422 const struct ieee80211_mgmt *mgmt, size_t frame_len,
423 u8 *pos, size_t left);
e73ffa09 424int fils_encrypt_assoc(struct wpa_state_machine *sm, u8 *buf,
91d91abf
JM
425 size_t current_len, size_t max_len,
426 const struct wpabuf *hlp);
da24c5aa 427int fils_set_tk(struct wpa_state_machine *sm);
fa61bff6 428u8 * hostapd_eid_assoc_fils_session(struct wpa_state_machine *sm, u8 *eid,
8b5ddda5
JM
429 const u8 *fils_session,
430 struct wpabuf *fils_hlp_resp);
087631b9
JM
431const u8 * wpa_fils_validate_fils_session(struct wpa_state_machine *sm,
432 const u8 *ies, size_t ies_len,
433 const u8 *fils_session);
bd599353
JM
434int wpa_fils_validate_key_confirm(struct wpa_state_machine *sm, const u8 *ies,
435 size_t ies_len);
7cebc8e2 436
5db997e3 437int wpa_auth_write_fte(struct wpa_authenticator *wpa_auth, u8 *buf, size_t len);
8acbf85f
JM
438void wpa_auth_get_fils_aead_params(struct wpa_state_machine *sm,
439 u8 *fils_anonce, u8 *fils_snonce,
440 u8 *fils_kek, size_t *fils_kek_len);
d8c8d857
JM
441u8 * wpa_auth_write_assoc_resp_owe(struct wpa_state_machine *sm,
442 u8 *pos, size_t max_len,
443 const u8 *req_ies, size_t req_ies_len);
5db997e3 444
3d695328
JM
445int wpa_auth_resend_m1(struct wpa_state_machine *sm, int change_anonce,
446 void (*cb)(void *ctx1, void *ctx2),
447 void *ctx1, void *ctx2);
448int wpa_auth_resend_m3(struct wpa_state_machine *sm,
449 void (*cb)(void *ctx1, void *ctx2),
450 void *ctx1, void *ctx2);
451int wpa_auth_resend_group_m1(struct wpa_state_machine *sm,
452 void (*cb)(void *ctx1, void *ctx2),
453 void *ctx1, void *ctx2);
92662fb2 454int wpa_auth_rekey_gtk(struct wpa_authenticator *wpa_auth);
6bc2f00f 455
6fc6879b 456#endif /* WPA_AUTH_H */