]> git.ipfire.org Git - thirdparty/hostap.git/blob - src/common/dpp.h
03eabef43c85263ed13780886e94d22ac02aef01
[thirdparty/hostap.git] / src / common / dpp.h
1 /*
2 * DPP functionality shared between hostapd and wpa_supplicant
3 * Copyright (c) 2017, Qualcomm Atheros, Inc.
4 * Copyright (c) 2018-2019, The Linux Foundation
5 *
6 * This software may be distributed under the terms of the BSD license.
7 * See README for more details.
8 */
9
10 #ifndef DPP_H
11 #define DPP_H
12
13 #include <openssl/x509.h>
14
15 #include "utils/list.h"
16 #include "common/wpa_common.h"
17 #include "crypto/sha256.h"
18
19 #define DPP_HDR_LEN (4 + 2) /* OUI, OUI Type, Crypto Suite, DPP frame type */
20
21 enum dpp_public_action_frame_type {
22 DPP_PA_AUTHENTICATION_REQ = 0,
23 DPP_PA_AUTHENTICATION_RESP = 1,
24 DPP_PA_AUTHENTICATION_CONF = 2,
25 DPP_PA_PEER_DISCOVERY_REQ = 5,
26 DPP_PA_PEER_DISCOVERY_RESP = 6,
27 DPP_PA_PKEX_EXCHANGE_REQ = 7,
28 DPP_PA_PKEX_EXCHANGE_RESP = 8,
29 DPP_PA_PKEX_COMMIT_REVEAL_REQ = 9,
30 DPP_PA_PKEX_COMMIT_REVEAL_RESP = 10,
31 DPP_PA_CONFIGURATION_RESULT = 11,
32 };
33
34 enum dpp_attribute_id {
35 DPP_ATTR_STATUS = 0x1000,
36 DPP_ATTR_I_BOOTSTRAP_KEY_HASH = 0x1001,
37 DPP_ATTR_R_BOOTSTRAP_KEY_HASH = 0x1002,
38 DPP_ATTR_I_PROTOCOL_KEY = 0x1003,
39 DPP_ATTR_WRAPPED_DATA = 0x1004,
40 DPP_ATTR_I_NONCE = 0x1005,
41 DPP_ATTR_I_CAPABILITIES = 0x1006,
42 DPP_ATTR_R_NONCE = 0x1007,
43 DPP_ATTR_R_CAPABILITIES = 0x1008,
44 DPP_ATTR_R_PROTOCOL_KEY = 0x1009,
45 DPP_ATTR_I_AUTH_TAG = 0x100A,
46 DPP_ATTR_R_AUTH_TAG = 0x100B,
47 DPP_ATTR_CONFIG_OBJ = 0x100C,
48 DPP_ATTR_CONNECTOR = 0x100D,
49 DPP_ATTR_CONFIG_ATTR_OBJ = 0x100E,
50 DPP_ATTR_BOOTSTRAP_KEY = 0x100F,
51 DPP_ATTR_OWN_NET_NK_HASH = 0x1011,
52 DPP_ATTR_FINITE_CYCLIC_GROUP = 0x1012,
53 DPP_ATTR_ENCRYPTED_KEY = 0x1013,
54 DPP_ATTR_ENROLLEE_NONCE = 0x1014,
55 DPP_ATTR_CODE_IDENTIFIER = 0x1015,
56 DPP_ATTR_TRANSACTION_ID = 0x1016,
57 DPP_ATTR_BOOTSTRAP_INFO = 0x1017,
58 DPP_ATTR_CHANNEL = 0x1018,
59 DPP_ATTR_PROTOCOL_VERSION = 0x1019,
60 DPP_ATTR_ENVELOPED_DATA = 0x101A,
61 };
62
63 enum dpp_status_error {
64 DPP_STATUS_OK = 0,
65 DPP_STATUS_NOT_COMPATIBLE = 1,
66 DPP_STATUS_AUTH_FAILURE = 2,
67 DPP_STATUS_UNWRAP_FAILURE = 3,
68 DPP_STATUS_BAD_GROUP = 4,
69 DPP_STATUS_CONFIGURE_FAILURE = 5,
70 DPP_STATUS_RESPONSE_PENDING = 6,
71 DPP_STATUS_INVALID_CONNECTOR = 7,
72 DPP_STATUS_NO_MATCH = 8,
73 DPP_STATUS_CONFIG_REJECTED = 9,
74 };
75
76 #define DPP_CAPAB_ENROLLEE BIT(0)
77 #define DPP_CAPAB_CONFIGURATOR BIT(1)
78 #define DPP_CAPAB_ROLE_MASK (BIT(0) | BIT(1))
79
80 #define DPP_BOOTSTRAP_MAX_FREQ 30
81 #define DPP_MAX_NONCE_LEN 32
82 #define DPP_MAX_HASH_LEN 64
83 #define DPP_MAX_SHARED_SECRET_LEN 66
84
85 struct dpp_curve_params {
86 const char *name;
87 size_t hash_len;
88 size_t aes_siv_key_len;
89 size_t nonce_len;
90 size_t prime_len;
91 const char *jwk_crv;
92 u16 ike_group;
93 const char *jws_alg;
94 };
95
96 enum dpp_bootstrap_type {
97 DPP_BOOTSTRAP_QR_CODE,
98 DPP_BOOTSTRAP_PKEX,
99 };
100
101 struct dpp_bootstrap_info {
102 struct dl_list list;
103 unsigned int id;
104 enum dpp_bootstrap_type type;
105 char *uri;
106 u8 mac_addr[ETH_ALEN];
107 char *info;
108 unsigned int freq[DPP_BOOTSTRAP_MAX_FREQ];
109 unsigned int num_freq;
110 int own;
111 EVP_PKEY *pubkey;
112 u8 pubkey_hash[SHA256_MAC_LEN];
113 const struct dpp_curve_params *curve;
114 unsigned int pkex_t; /* number of failures before dpp_pkex
115 * instantiation */
116 };
117
118 #define PKEX_COUNTER_T_LIMIT 5
119
120 struct dpp_pkex {
121 void *msg_ctx;
122 unsigned int initiator:1;
123 unsigned int exchange_done:1;
124 unsigned int failed:1;
125 struct dpp_bootstrap_info *own_bi;
126 u8 own_mac[ETH_ALEN];
127 u8 peer_mac[ETH_ALEN];
128 char *identifier;
129 char *code;
130 EVP_PKEY *x;
131 EVP_PKEY *y;
132 u8 Mx[DPP_MAX_SHARED_SECRET_LEN];
133 u8 Nx[DPP_MAX_SHARED_SECRET_LEN];
134 u8 z[DPP_MAX_HASH_LEN];
135 EVP_PKEY *peer_bootstrap_key;
136 struct wpabuf *exchange_req;
137 struct wpabuf *exchange_resp;
138 unsigned int t; /* number of failures on code use */
139 unsigned int exch_req_wait_time;
140 unsigned int exch_req_tries;
141 unsigned int freq;
142 };
143
144 enum dpp_akm {
145 DPP_AKM_UNKNOWN,
146 DPP_AKM_DPP,
147 DPP_AKM_PSK,
148 DPP_AKM_SAE,
149 DPP_AKM_PSK_SAE
150 };
151
152 struct dpp_configuration {
153 u8 ssid[32];
154 size_t ssid_len;
155 enum dpp_akm akm;
156
157 /* For DPP configuration (connector) */
158 os_time_t netaccesskey_expiry;
159
160 /* TODO: groups */
161 char *group_id;
162
163 /* For legacy configuration */
164 char *passphrase;
165 u8 psk[32];
166 int psk_set;
167 };
168
169 struct dpp_authentication {
170 void *msg_ctx;
171 u8 peer_version;
172 const struct dpp_curve_params *curve;
173 struct dpp_bootstrap_info *peer_bi;
174 struct dpp_bootstrap_info *own_bi;
175 struct dpp_bootstrap_info *tmp_own_bi;
176 u8 waiting_pubkey_hash[SHA256_MAC_LEN];
177 int response_pending;
178 enum dpp_status_error auth_resp_status;
179 enum dpp_status_error conf_resp_status;
180 u8 peer_mac_addr[ETH_ALEN];
181 u8 i_nonce[DPP_MAX_NONCE_LEN];
182 u8 r_nonce[DPP_MAX_NONCE_LEN];
183 u8 e_nonce[DPP_MAX_NONCE_LEN];
184 u8 i_capab;
185 u8 r_capab;
186 EVP_PKEY *own_protocol_key;
187 EVP_PKEY *peer_protocol_key;
188 struct wpabuf *req_msg;
189 struct wpabuf *resp_msg;
190 /* Intersection of possible frequencies for initiating DPP
191 * Authentication exchange */
192 unsigned int freq[DPP_BOOTSTRAP_MAX_FREQ];
193 unsigned int num_freq, freq_idx;
194 unsigned int curr_freq;
195 unsigned int neg_freq;
196 unsigned int num_freq_iters;
197 size_t secret_len;
198 u8 Mx[DPP_MAX_SHARED_SECRET_LEN];
199 size_t Mx_len;
200 u8 Nx[DPP_MAX_SHARED_SECRET_LEN];
201 size_t Nx_len;
202 u8 Lx[DPP_MAX_SHARED_SECRET_LEN];
203 size_t Lx_len;
204 u8 k1[DPP_MAX_HASH_LEN];
205 u8 k2[DPP_MAX_HASH_LEN];
206 u8 ke[DPP_MAX_HASH_LEN];
207 int initiator;
208 int waiting_auth_resp;
209 int waiting_auth_conf;
210 int auth_req_ack;
211 unsigned int auth_resp_tries;
212 u8 allowed_roles;
213 int configurator;
214 int remove_on_tx_status;
215 int connect_on_tx_status;
216 int waiting_conf_result;
217 int auth_success;
218 struct wpabuf *conf_req;
219 const struct wpabuf *conf_resp; /* owned by GAS server */
220 struct dpp_configuration *conf_ap;
221 struct dpp_configuration *conf_sta;
222 struct dpp_configurator *conf;
223 char *connector; /* received signedConnector */
224 u8 ssid[SSID_MAX_LEN];
225 u8 ssid_len;
226 char passphrase[64];
227 u8 psk[PMK_LEN];
228 int psk_set;
229 enum dpp_akm akm;
230 struct wpabuf *net_access_key;
231 os_time_t net_access_key_expiry;
232 struct wpabuf *c_sign_key;
233 #ifdef CONFIG_TESTING_OPTIONS
234 char *config_obj_override;
235 char *discovery_override;
236 char *groups_override;
237 unsigned int ignore_netaccesskey_mismatch:1;
238 #endif /* CONFIG_TESTING_OPTIONS */
239 };
240
241 struct dpp_configurator {
242 struct dl_list list;
243 unsigned int id;
244 int own;
245 EVP_PKEY *csign;
246 char *kid;
247 const struct dpp_curve_params *curve;
248 };
249
250 struct dpp_introduction {
251 u8 pmkid[PMKID_LEN];
252 u8 pmk[PMK_LEN_MAX];
253 size_t pmk_len;
254 };
255
256 #ifdef CONFIG_TESTING_OPTIONS
257 enum dpp_test_behavior {
258 DPP_TEST_DISABLED = 0,
259 DPP_TEST_AFTER_WRAPPED_DATA_AUTH_REQ = 1,
260 DPP_TEST_AFTER_WRAPPED_DATA_AUTH_RESP = 2,
261 DPP_TEST_AFTER_WRAPPED_DATA_AUTH_CONF = 3,
262 DPP_TEST_AFTER_WRAPPED_DATA_PKEX_CR_REQ = 4,
263 DPP_TEST_AFTER_WRAPPED_DATA_PKEX_CR_RESP = 5,
264 DPP_TEST_AFTER_WRAPPED_DATA_CONF_REQ = 6,
265 DPP_TEST_AFTER_WRAPPED_DATA_CONF_RESP = 7,
266 DPP_TEST_ZERO_I_CAPAB = 8,
267 DPP_TEST_ZERO_R_CAPAB = 9,
268 DPP_TEST_NO_R_BOOTSTRAP_KEY_HASH_AUTH_REQ = 10,
269 DPP_TEST_NO_I_BOOTSTRAP_KEY_HASH_AUTH_REQ = 11,
270 DPP_TEST_NO_I_PROTO_KEY_AUTH_REQ = 12,
271 DPP_TEST_NO_I_NONCE_AUTH_REQ = 13,
272 DPP_TEST_NO_I_CAPAB_AUTH_REQ = 14,
273 DPP_TEST_NO_WRAPPED_DATA_AUTH_REQ = 15,
274 DPP_TEST_NO_STATUS_AUTH_RESP = 16,
275 DPP_TEST_NO_R_BOOTSTRAP_KEY_HASH_AUTH_RESP = 17,
276 DPP_TEST_NO_I_BOOTSTRAP_KEY_HASH_AUTH_RESP = 18,
277 DPP_TEST_NO_R_PROTO_KEY_AUTH_RESP = 19,
278 DPP_TEST_NO_R_NONCE_AUTH_RESP = 20,
279 DPP_TEST_NO_I_NONCE_AUTH_RESP = 21,
280 DPP_TEST_NO_R_CAPAB_AUTH_RESP = 22,
281 DPP_TEST_NO_R_AUTH_AUTH_RESP = 23,
282 DPP_TEST_NO_WRAPPED_DATA_AUTH_RESP = 24,
283 DPP_TEST_NO_STATUS_AUTH_CONF = 25,
284 DPP_TEST_NO_R_BOOTSTRAP_KEY_HASH_AUTH_CONF = 26,
285 DPP_TEST_NO_I_BOOTSTRAP_KEY_HASH_AUTH_CONF = 27,
286 DPP_TEST_NO_I_AUTH_AUTH_CONF = 28,
287 DPP_TEST_NO_WRAPPED_DATA_AUTH_CONF = 29,
288 DPP_TEST_I_NONCE_MISMATCH_AUTH_RESP = 30,
289 DPP_TEST_INCOMPATIBLE_R_CAPAB_AUTH_RESP = 31,
290 DPP_TEST_R_AUTH_MISMATCH_AUTH_RESP = 32,
291 DPP_TEST_I_AUTH_MISMATCH_AUTH_CONF = 33,
292 DPP_TEST_NO_FINITE_CYCLIC_GROUP_PKEX_EXCHANGE_REQ = 34,
293 DPP_TEST_NO_ENCRYPTED_KEY_PKEX_EXCHANGE_REQ = 35,
294 DPP_TEST_NO_STATUS_PKEX_EXCHANGE_RESP = 36,
295 DPP_TEST_NO_ENCRYPTED_KEY_PKEX_EXCHANGE_RESP = 37,
296 DPP_TEST_NO_BOOTSTRAP_KEY_PKEX_CR_REQ = 38,
297 DPP_TEST_NO_I_AUTH_TAG_PKEX_CR_REQ = 39,
298 DPP_TEST_NO_WRAPPED_DATA_PKEX_CR_REQ = 40,
299 DPP_TEST_NO_BOOTSTRAP_KEY_PKEX_CR_RESP = 41,
300 DPP_TEST_NO_R_AUTH_TAG_PKEX_CR_RESP = 42,
301 DPP_TEST_NO_WRAPPED_DATA_PKEX_CR_RESP = 43,
302 DPP_TEST_INVALID_ENCRYPTED_KEY_PKEX_EXCHANGE_REQ = 44,
303 DPP_TEST_INVALID_ENCRYPTED_KEY_PKEX_EXCHANGE_RESP = 45,
304 DPP_TEST_INVALID_STATUS_PKEX_EXCHANGE_RESP = 46,
305 DPP_TEST_INVALID_BOOTSTRAP_KEY_PKEX_CR_REQ = 47,
306 DPP_TEST_INVALID_BOOTSTRAP_KEY_PKEX_CR_RESP = 48,
307 DPP_TEST_I_AUTH_TAG_MISMATCH_PKEX_CR_REQ = 49,
308 DPP_TEST_R_AUTH_TAG_MISMATCH_PKEX_CR_RESP = 50,
309 DPP_TEST_NO_E_NONCE_CONF_REQ = 51,
310 DPP_TEST_NO_CONFIG_ATTR_OBJ_CONF_REQ = 52,
311 DPP_TEST_NO_WRAPPED_DATA_CONF_REQ = 53,
312 DPP_TEST_NO_E_NONCE_CONF_RESP = 54,
313 DPP_TEST_NO_CONFIG_OBJ_CONF_RESP = 55,
314 DPP_TEST_NO_STATUS_CONF_RESP = 56,
315 DPP_TEST_NO_WRAPPED_DATA_CONF_RESP = 57,
316 DPP_TEST_INVALID_STATUS_CONF_RESP = 58,
317 DPP_TEST_E_NONCE_MISMATCH_CONF_RESP = 59,
318 DPP_TEST_NO_TRANSACTION_ID_PEER_DISC_REQ = 60,
319 DPP_TEST_NO_CONNECTOR_PEER_DISC_REQ = 61,
320 DPP_TEST_NO_TRANSACTION_ID_PEER_DISC_RESP = 62,
321 DPP_TEST_NO_STATUS_PEER_DISC_RESP = 63,
322 DPP_TEST_NO_CONNECTOR_PEER_DISC_RESP = 64,
323 DPP_TEST_AUTH_RESP_IN_PLACE_OF_CONF = 65,
324 DPP_TEST_INVALID_I_PROTO_KEY_AUTH_REQ = 66,
325 DPP_TEST_INVALID_R_PROTO_KEY_AUTH_RESP = 67,
326 DPP_TEST_INVALID_R_BOOTSTRAP_KEY_HASH_AUTH_REQ = 68,
327 DPP_TEST_INVALID_I_BOOTSTRAP_KEY_HASH_AUTH_REQ = 69,
328 DPP_TEST_INVALID_R_BOOTSTRAP_KEY_HASH_AUTH_RESP = 70,
329 DPP_TEST_INVALID_I_BOOTSTRAP_KEY_HASH_AUTH_RESP = 71,
330 DPP_TEST_INVALID_R_BOOTSTRAP_KEY_HASH_AUTH_CONF = 72,
331 DPP_TEST_INVALID_I_BOOTSTRAP_KEY_HASH_AUTH_CONF = 73,
332 DPP_TEST_INVALID_STATUS_AUTH_RESP = 74,
333 DPP_TEST_INVALID_STATUS_AUTH_CONF = 75,
334 DPP_TEST_INVALID_CONFIG_ATTR_OBJ_CONF_REQ = 76,
335 DPP_TEST_INVALID_TRANSACTION_ID_PEER_DISC_RESP = 77,
336 DPP_TEST_INVALID_STATUS_PEER_DISC_RESP = 78,
337 DPP_TEST_INVALID_CONNECTOR_PEER_DISC_RESP = 79,
338 DPP_TEST_INVALID_CONNECTOR_PEER_DISC_REQ = 80,
339 DPP_TEST_INVALID_I_NONCE_AUTH_REQ = 81,
340 DPP_TEST_INVALID_TRANSACTION_ID_PEER_DISC_REQ = 82,
341 DPP_TEST_INVALID_E_NONCE_CONF_REQ = 83,
342 DPP_TEST_STOP_AT_PKEX_EXCHANGE_RESP = 84,
343 DPP_TEST_STOP_AT_PKEX_CR_REQ = 85,
344 DPP_TEST_STOP_AT_PKEX_CR_RESP = 86,
345 DPP_TEST_STOP_AT_AUTH_REQ = 87,
346 DPP_TEST_STOP_AT_AUTH_RESP = 88,
347 DPP_TEST_STOP_AT_AUTH_CONF = 89,
348 DPP_TEST_STOP_AT_CONF_REQ = 90,
349 DPP_TEST_REJECT_CONFIG = 91,
350 };
351
352 extern enum dpp_test_behavior dpp_test;
353 extern u8 dpp_pkex_own_mac_override[ETH_ALEN];
354 extern u8 dpp_pkex_peer_mac_override[ETH_ALEN];
355 extern u8 dpp_pkex_ephemeral_key_override[600];
356 extern size_t dpp_pkex_ephemeral_key_override_len;
357 extern u8 dpp_protocol_key_override[600];
358 extern size_t dpp_protocol_key_override_len;
359 extern u8 dpp_nonce_override[DPP_MAX_NONCE_LEN];
360 extern size_t dpp_nonce_override_len;
361 #endif /* CONFIG_TESTING_OPTIONS */
362
363 void dpp_bootstrap_info_free(struct dpp_bootstrap_info *info);
364 const char * dpp_bootstrap_type_txt(enum dpp_bootstrap_type type);
365 int dpp_bootstrap_key_hash(struct dpp_bootstrap_info *bi);
366 int dpp_parse_uri_chan_list(struct dpp_bootstrap_info *bi,
367 const char *chan_list);
368 int dpp_parse_uri_mac(struct dpp_bootstrap_info *bi, const char *mac);
369 int dpp_parse_uri_info(struct dpp_bootstrap_info *bi, const char *info);
370 struct dpp_bootstrap_info * dpp_parse_qr_code(const char *uri);
371 char * dpp_keygen(struct dpp_bootstrap_info *bi, const char *curve,
372 const u8 *privkey, size_t privkey_len);
373 struct hostapd_hw_modes;
374 struct dpp_authentication * dpp_auth_init(void *msg_ctx,
375 struct dpp_bootstrap_info *peer_bi,
376 struct dpp_bootstrap_info *own_bi,
377 u8 dpp_allowed_roles,
378 unsigned int neg_freq,
379 struct hostapd_hw_modes *own_modes,
380 u16 num_modes);
381 struct dpp_authentication *
382 dpp_auth_req_rx(void *msg_ctx, u8 dpp_allowed_roles, int qr_mutual,
383 struct dpp_bootstrap_info *peer_bi,
384 struct dpp_bootstrap_info *own_bi,
385 unsigned int freq, const u8 *hdr, const u8 *attr_start,
386 size_t attr_len);
387 struct wpabuf *
388 dpp_auth_resp_rx(struct dpp_authentication *auth, const u8 *hdr,
389 const u8 *attr_start, size_t attr_len);
390 struct wpabuf * dpp_build_conf_req(struct dpp_authentication *auth,
391 const char *json);
392 int dpp_auth_conf_rx(struct dpp_authentication *auth, const u8 *hdr,
393 const u8 *attr_start, size_t attr_len);
394 int dpp_notify_new_qr_code(struct dpp_authentication *auth,
395 struct dpp_bootstrap_info *peer_bi);
396 struct dpp_configuration * dpp_configuration_alloc(const char *type);
397 int dpp_configuration_valid(const struct dpp_configuration *conf);
398 void dpp_configuration_free(struct dpp_configuration *conf);
399 int dpp_configuration_parse(struct dpp_authentication *auth, const char *cmd);
400 void dpp_auth_deinit(struct dpp_authentication *auth);
401 struct wpabuf *
402 dpp_conf_req_rx(struct dpp_authentication *auth, const u8 *attr_start,
403 size_t attr_len);
404 int dpp_conf_resp_rx(struct dpp_authentication *auth,
405 const struct wpabuf *resp);
406 enum dpp_status_error dpp_conf_result_rx(struct dpp_authentication *auth,
407 const u8 *hdr,
408 const u8 *attr_start, size_t attr_len);
409 struct wpabuf * dpp_build_conf_result(struct dpp_authentication *auth,
410 enum dpp_status_error status);
411 struct wpabuf * dpp_alloc_msg(enum dpp_public_action_frame_type type,
412 size_t len);
413 const u8 * dpp_get_attr(const u8 *buf, size_t len, u16 req_id, u16 *ret_len);
414 int dpp_check_attrs(const u8 *buf, size_t len);
415 int dpp_key_expired(const char *timestamp, os_time_t *expiry);
416 const char * dpp_akm_str(enum dpp_akm akm);
417 int dpp_configurator_get_key(const struct dpp_configurator *conf, char *buf,
418 size_t buflen);
419 void dpp_configurator_free(struct dpp_configurator *conf);
420 struct dpp_configurator *
421 dpp_keygen_configurator(const char *curve, const u8 *privkey,
422 size_t privkey_len);
423 int dpp_configurator_own_config(struct dpp_authentication *auth,
424 const char *curve, int ap);
425 enum dpp_status_error
426 dpp_peer_intro(struct dpp_introduction *intro, const char *own_connector,
427 const u8 *net_access_key, size_t net_access_key_len,
428 const u8 *csign_key, size_t csign_key_len,
429 const u8 *peer_connector, size_t peer_connector_len,
430 os_time_t *expiry);
431 struct dpp_pkex * dpp_pkex_init(void *msg_ctx, struct dpp_bootstrap_info *bi,
432 const u8 *own_mac,
433 const char *identifier,
434 const char *code);
435 struct dpp_pkex * dpp_pkex_rx_exchange_req(void *msg_ctx,
436 struct dpp_bootstrap_info *bi,
437 const u8 *own_mac,
438 const u8 *peer_mac,
439 const char *identifier,
440 const char *code,
441 const u8 *buf, size_t len);
442 struct wpabuf * dpp_pkex_rx_exchange_resp(struct dpp_pkex *pkex,
443 const u8 *peer_mac,
444 const u8 *buf, size_t len);
445 struct wpabuf * dpp_pkex_rx_commit_reveal_req(struct dpp_pkex *pkex,
446 const u8 *hdr,
447 const u8 *buf, size_t len);
448 int dpp_pkex_rx_commit_reveal_resp(struct dpp_pkex *pkex, const u8 *hdr,
449 const u8 *buf, size_t len);
450 void dpp_pkex_free(struct dpp_pkex *pkex);
451
452 char * dpp_corrupt_connector_signature(const char *connector);
453
454 #endif /* DPP_H */