json_value_sep(json);
json_add_string(json, "pkcs10", csr);
}
+#ifdef CONFIG_DPP3
+ json_value_sep(json);
+ json_add_int(json, "capabilities", DPP_ENROLLEE_CAPAB_SAE_PW_ID);
+#endif /* CONFIG_DPP3 */
if (extra_name && extra_value && extra_name[0] && extra_value[0]) {
json_value_sep(json);
wpabuf_printf(json, "\"%s\":%s", extra_name, extra_value);
if (pass && pass->type == JSON_STRING) {
size_t len = os_strlen(pass->string);
+#ifdef CONFIG_DPP3
+ struct json_token *saepi = json_get_member(cred, "idpass");
+#endif /* CONFIG_DPP3 */
wpa_hexdump_ascii_key(MSG_DEBUG, "DPP: Legacy passphrase",
pass->string, len);
}
os_strlcpy(conf->passphrase, pass->string,
sizeof(conf->passphrase));
+#ifdef CONFIG_DPP3
+ if (saepi && saepi->type == JSON_STRING)
+ os_strlcpy(conf->password_id, saepi->string,
+ sizeof(conf->password_id));
+#endif /* CONFIG_DPP3 */
} else if (psk_hex && psk_hex->type == JSON_STRING) {
if (dpp_akm_sae(conf->akm) && !dpp_akm_psk(conf->akm)) {
wpa_printf(MSG_DEBUG,
#define DPP_MAX_SHARED_SECRET_LEN 66
#define DPP_CP_LEN 64
+/* DPP Configuration Request - Enrollee Capabilities */
+#define DPP_ENROLLEE_CAPAB_SAE_PW_ID BIT(0)
+
struct dpp_curve_params {
const char *name;
size_t hash_len;
u8 ssid_len;
int ssid_charset;
char passphrase[64];
+#ifdef CONFIG_DPP3
+ char password_id[64];
+#endif /* CONFIG_DPP3 */
u8 psk[PMK_LEN];
int psk_set;
enum dpp_akm akm;
#define DPP_EVENT_CONFOBJ_SSID "DPP-CONFOBJ-SSID "
#define DPP_EVENT_CONFOBJ_SSID_CHARSET "DPP-CONFOBJ-SSID-CHARSET "
#define DPP_EVENT_CONFOBJ_PASS "DPP-CONFOBJ-PASS "
+#define DPP_EVENT_CONFOBJ_IDPASS "DPP-CONFOBJ-IDPASS "
#define DPP_EVENT_CONFOBJ_PSK "DPP-CONFOBJ-PSK "
#define DPP_EVENT_CONNECTOR "DPP-CONNECTOR "
#define DPP_EVENT_C_SIGN_KEY "DPP-C-SIGN-KEY "
os_memcpy(ssid->ssid, conf->ssid, conf->ssid_len);
ssid->ssid_len = conf->ssid_len;
+#ifdef CONFIG_DPP3
+ if (conf->akm == DPP_AKM_SAE && conf->password_id[0]) {
+ size_t len = os_strlen(conf->password_id);
+
+ ssid->sae_password_id = os_zalloc(len + 1);
+ if (!ssid->sae_password_id)
+ goto fail;
+ os_memcpy(ssid->sae_password_id, conf->password_id, len);
+ }
+#endif /* CONFIG_DPP3 */
+
if (conf->connector) {
if (dpp_akm_dpp(conf->akm)) {
ssid->key_mgmt = WPA_KEY_MGMT_DPP;
wpa_msg(wpa_s, MSG_INFO, DPP_EVENT_CONFOBJ_PSK "%s",
hex);
}
+#ifdef CONFIG_DPP3
+ if (conf->password_id[0]) {
+ wpa_msg(wpa_s, MSG_INFO, DPP_EVENT_CONFOBJ_IDPASS "%s",
+ conf->password_id);
+ }
+#endif /* CONFIG_DPP3 */
if (conf->c_sign_key) {
char *hex;
size_t hexlen;