This extends hostapd and wpa_supplicant DPP implementation to allow the bootstrapping URI to be generated for and parsed from an NFC Tag with an NFC URI Record. This is similar to the way the bootstrapping URI is used with QR Code for unidirectional authentication. The DPP_BOOTSTRAP_GEN command uses "type=nfc-uri" to request the URI to be assigned for NFC URI Record. In practice, the URI is generated identically to the QR Code case, but the internal entry maintains the NFC-URI type. A new command "DPP_NFC_URI <uri>" can now be used to parse the URI read from an NFC Tag with the NFC URI Record. This is similar to the DPP_QR_CODE command. Other commands (mainly, DPP_LISTEN and DPP_AUTH_INIT) are used for NFC URI in the same way as they are used for QR Code. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
40 lines
1.9 KiB
C
40 lines
1.9 KiB
C
/*
|
|
* hostapd / DPP integration
|
|
* Copyright (c) 2017, Qualcomm Atheros, Inc.
|
|
* Copyright (c) 2018-2019, The Linux Foundation
|
|
*
|
|
* This software may be distributed under the terms of the BSD license.
|
|
* See README for more details.
|
|
*/
|
|
|
|
#ifndef DPP_HOSTAPD_H
|
|
#define DPP_HOSTAPD_H
|
|
|
|
int hostapd_dpp_qr_code(struct hostapd_data *hapd, const char *cmd);
|
|
int hostapd_dpp_nfc_uri(struct hostapd_data *hapd, const char *cmd);
|
|
int hostapd_dpp_auth_init(struct hostapd_data *hapd, const char *cmd);
|
|
int hostapd_dpp_listen(struct hostapd_data *hapd, const char *cmd);
|
|
void hostapd_dpp_listen_stop(struct hostapd_data *hapd);
|
|
void hostapd_dpp_rx_action(struct hostapd_data *hapd, const u8 *src,
|
|
const u8 *buf, size_t len, unsigned int freq);
|
|
void hostapd_dpp_tx_status(struct hostapd_data *hapd, const u8 *dst,
|
|
const u8 *data, size_t data_len, int ok);
|
|
struct wpabuf *
|
|
hostapd_dpp_gas_req_handler(struct hostapd_data *hapd, const u8 *sa,
|
|
const u8 *query, size_t query_len,
|
|
const u8 *data, size_t data_len);
|
|
void hostapd_dpp_gas_status_handler(struct hostapd_data *hapd, int ok);
|
|
int hostapd_dpp_configurator_add(struct hostapd_data *hapd, const char *cmd);
|
|
int hostapd_dpp_configurator_remove(struct hostapd_data *hapd, const char *id);
|
|
int hostapd_dpp_configurator_sign(struct hostapd_data *hapd, const char *cmd);
|
|
int hostapd_dpp_configurator_get_key(struct hostapd_data *hapd, unsigned int id,
|
|
char *buf, size_t buflen);
|
|
int hostapd_dpp_pkex_add(struct hostapd_data *hapd, const char *cmd);
|
|
int hostapd_dpp_pkex_remove(struct hostapd_data *hapd, const char *id);
|
|
void hostapd_dpp_stop(struct hostapd_data *hapd);
|
|
int hostapd_dpp_init(struct hostapd_data *hapd);
|
|
void hostapd_dpp_deinit(struct hostapd_data *hapd);
|
|
void hostapd_dpp_init_global(struct hapd_interfaces *ifaces);
|
|
void hostapd_dpp_deinit_global(struct hapd_interfaces *ifaces);
|
|
|
|
#endif /* DPP_HOSTAPD_H */
|