Lines Matching refs:auth
57 void dpp_auth_fail(struct dpp_authentication *auth, const char *txt) in dpp_auth_fail() argument
59 wpa_msg(auth->msg_ctx, MSG_INFO, DPP_EVENT_FAIL "%s", txt); in dpp_auth_fail()
503 static int dpp_channel_intersect(struct dpp_authentication *auth, in dpp_channel_intersect() argument
507 struct dpp_bootstrap_info *peer_bi = auth->peer_bi; in dpp_channel_intersect()
512 if (freq_included(auth->freq, auth->num_freq, freq)) in dpp_channel_intersect()
515 auth->freq[auth->num_freq++] = freq; in dpp_channel_intersect()
517 if (!auth->num_freq) { in dpp_channel_intersect()
522 auth->curr_freq = auth->freq[0]; in dpp_channel_intersect()
527 static int dpp_channel_local_list(struct dpp_authentication *auth, in dpp_channel_local_list() argument
535 auth->num_freq = 0; in dpp_channel_local_list()
538 auth->freq[0] = 2412; in dpp_channel_local_list()
539 auth->freq[1] = 2437; in dpp_channel_local_list()
540 auth->freq[2] = 2462; in dpp_channel_local_list()
541 auth->num_freq = 3; in dpp_channel_local_list()
553 if (freq_included(auth->freq, auth->num_freq, freq)) in dpp_channel_local_list()
555 auth->freq[auth->num_freq++] = freq; in dpp_channel_local_list()
556 if (auth->num_freq == DPP_BOOTSTRAP_MAX_FREQ) { in dpp_channel_local_list()
563 return auth->num_freq == 0 ? -1 : 0; in dpp_channel_local_list()
567 int dpp_prepare_channel_list(struct dpp_authentication *auth, in dpp_prepare_channel_list() argument
578 auth->num_freq = 1; in dpp_prepare_channel_list()
579 auth->freq[0] = neg_freq; in dpp_prepare_channel_list()
580 auth->curr_freq = neg_freq; in dpp_prepare_channel_list()
584 if (auth->peer_bi->num_freq > 0) in dpp_prepare_channel_list()
585 res = dpp_channel_intersect(auth, own_modes, num_modes); in dpp_prepare_channel_list()
587 res = dpp_channel_local_list(auth, own_modes, num_modes); in dpp_prepare_channel_list()
593 freq_to_start(auth->freq, auth->num_freq, 2462); in dpp_prepare_channel_list()
594 freq_to_start(auth->freq, auth->num_freq, 2412); in dpp_prepare_channel_list()
595 freq_to_start(auth->freq, auth->num_freq, 2437); in dpp_prepare_channel_list()
597 auth->freq_idx = 0; in dpp_prepare_channel_list()
598 auth->curr_freq = auth->freq[0]; in dpp_prepare_channel_list()
602 for (i = 0; i < auth->num_freq; i++) { in dpp_prepare_channel_list()
603 res = os_snprintf(pos, end - pos, " %u", auth->freq[i]); in dpp_prepare_channel_list()
656 struct dpp_authentication *auth; in dpp_alloc_auth() local
658 auth = os_zalloc(sizeof(*auth)); in dpp_alloc_auth()
659 if (!auth) in dpp_alloc_auth()
661 auth->global = dpp; in dpp_alloc_auth()
662 auth->msg_ctx = msg_ctx; in dpp_alloc_auth()
663 auth->conf_resp_status = 255; in dpp_alloc_auth()
664 return auth; in dpp_alloc_auth()
668 static struct wpabuf * dpp_build_conf_req_attr(struct dpp_authentication *auth, in dpp_build_conf_req_attr() argument
679 nonce_len = auth->curve->nonce_len; in dpp_build_conf_req_attr()
680 if (random_get_bytes(auth->e_nonce, nonce_len)) { in dpp_build_conf_req_attr()
684 wpa_hexdump(MSG_DEBUG, "DPP: E-nonce", auth->e_nonce, nonce_len); in dpp_build_conf_req_attr()
709 wpabuf_put_data(clear, auth->e_nonce, nonce_len - 1); in dpp_build_conf_req_attr()
721 wpabuf_put_data(clear, auth->e_nonce, nonce_len); in dpp_build_conf_req_attr()
746 if (aes_siv_encrypt(auth->ke, auth->curve->hash_len, in dpp_build_conf_req_attr()
795 struct wpabuf * dpp_build_conf_req(struct dpp_authentication *auth, in dpp_build_conf_req() argument
800 conf_req = dpp_build_conf_req_attr(auth, json); in dpp_build_conf_req()
822 struct wpabuf * dpp_build_conf_req_helper(struct dpp_authentication *auth, in dpp_build_conf_req_helper() argument
875 buf = dpp_build_conf_req(auth, wpabuf_head(json)); in dpp_build_conf_req_helper()
985 static int dpp_configuration_parse_helper(struct dpp_authentication *auth, in dpp_configuration_parse_helper() argument
1012 auth->provision_configurator = 1; in dpp_configuration_parse_helper()
1099 auth->conf_sta = conf_sta; in dpp_configuration_parse_helper()
1100 auth->conf_ap = conf_ap; in dpp_configuration_parse_helper()
1102 auth->conf2_sta = conf_sta; in dpp_configuration_parse_helper()
1103 auth->conf2_ap = conf_ap; in dpp_configuration_parse_helper()
1116 static int dpp_configuration_parse(struct dpp_authentication *auth, in dpp_configuration_parse() argument
1126 return dpp_configuration_parse_helper(auth, cmd, 0); in dpp_configuration_parse()
1134 res = dpp_configuration_parse_helper(auth, cmd, 0); in dpp_configuration_parse()
1138 res = dpp_configuration_parse_helper(auth, cmd + len, 1); in dpp_configuration_parse()
1143 dpp_configuration_free(auth->conf_sta); in dpp_configuration_parse()
1144 dpp_configuration_free(auth->conf2_sta); in dpp_configuration_parse()
1145 dpp_configuration_free(auth->conf_ap); in dpp_configuration_parse()
1146 dpp_configuration_free(auth->conf2_ap); in dpp_configuration_parse()
1168 int dpp_set_configurator(struct dpp_authentication *auth, const char *cmd) in dpp_set_configurator() argument
1174 if (!cmd || auth->configurator_set) in dpp_set_configurator()
1176 auth->configurator_set = 1; in dpp_set_configurator()
1193 if (!auth->conf && pos) { in dpp_set_configurator()
1195 auth->conf = dpp_configurator_get_id(auth->global, atoi(pos)); in dpp_set_configurator()
1196 if (!auth->conf) { in dpp_set_configurator()
1206 auth->send_conn_status = atoi(pos); in dpp_set_configurator()
1212 auth->akm_use_selector = atoi(pos); in dpp_set_configurator()
1215 if (dpp_configuration_parse(auth, cmd) < 0) { in dpp_set_configurator()
1216 wpa_msg(auth->msg_ctx, MSG_INFO, in dpp_set_configurator()
1227 void dpp_auth_deinit(struct dpp_authentication *auth) in dpp_auth_deinit() argument
1231 if (!auth) in dpp_auth_deinit()
1233 dpp_configuration_free(auth->conf_ap); in dpp_auth_deinit()
1234 dpp_configuration_free(auth->conf2_ap); in dpp_auth_deinit()
1235 dpp_configuration_free(auth->conf_sta); in dpp_auth_deinit()
1236 dpp_configuration_free(auth->conf2_sta); in dpp_auth_deinit()
1237 EVP_PKEY_free(auth->own_protocol_key); in dpp_auth_deinit()
1238 EVP_PKEY_free(auth->peer_protocol_key); in dpp_auth_deinit()
1239 EVP_PKEY_free(auth->reconfig_old_protocol_key); in dpp_auth_deinit()
1240 wpabuf_free(auth->req_msg); in dpp_auth_deinit()
1241 wpabuf_free(auth->resp_msg); in dpp_auth_deinit()
1242 wpabuf_free(auth->conf_req); in dpp_auth_deinit()
1243 wpabuf_free(auth->reconfig_req_msg); in dpp_auth_deinit()
1244 wpabuf_free(auth->reconfig_resp_msg); in dpp_auth_deinit()
1245 for (i = 0; i < auth->num_conf_obj; i++) { in dpp_auth_deinit()
1246 struct dpp_config_obj *conf = &auth->conf_obj[i]; in dpp_auth_deinit()
1252 dpp_free_asymmetric_key(auth->conf_key_pkg); in dpp_auth_deinit()
1254 wpabuf_free(auth->net_access_key); in dpp_auth_deinit()
1255 dpp_bootstrap_info_free(auth->tmp_own_bi); in dpp_auth_deinit()
1257 os_free(auth->config_obj_override); in dpp_auth_deinit()
1258 os_free(auth->discovery_override); in dpp_auth_deinit()
1259 os_free(auth->groups_override); in dpp_auth_deinit()
1261 bin_clear_free(auth, sizeof(*auth)); in dpp_auth_deinit()
1266 dpp_build_conf_start(struct dpp_authentication *auth, in dpp_build_conf_start() argument
1272 if (auth->discovery_override) in dpp_build_conf_start()
1273 tailroom += os_strlen(auth->discovery_override); in dpp_build_conf_start()
1283 if (auth->discovery_override) { in dpp_build_conf_start()
1285 auth->discovery_override); in dpp_build_conf_start()
1287 wpabuf_put_str(buf, auth->discovery_override); in dpp_build_conf_start()
1293 if (((!conf->ssid_charset || auth->peer_version < 2) && in dpp_build_conf_start()
1296 ((conf->ssid_charset && auth->peer_version >= 2) && in dpp_build_conf_start()
1381 dpp_build_conf_obj_dpp(struct dpp_authentication *auth, in dpp_build_conf_obj_dpp() argument
1394 if (!auth->conf) { in dpp_build_conf_obj_dpp()
1399 curve = auth->conf->curve; in dpp_build_conf_obj_dpp()
1402 if (dpp_akm_ver2(akm) && auth->peer_version < 2) { in dpp_build_conf_obj_dpp()
1409 if (auth->groups_override) in dpp_build_conf_obj_dpp()
1410 extra_len += os_strlen(auth->groups_override); in dpp_build_conf_obj_dpp()
1417 dppcon = wpabuf_alloc(extra_len + 2 * auth->curve->prime_len * 4 / 3); in dpp_build_conf_obj_dpp()
1421 if (auth->groups_override) { in dpp_build_conf_obj_dpp()
1423 if (auth->groups_override) { in dpp_build_conf_obj_dpp()
1426 auth->groups_override); in dpp_build_conf_obj_dpp()
1428 wpabuf_put_str(dppcon, auth->groups_override); in dpp_build_conf_obj_dpp()
1447 if (!auth->peer_protocol_key || in dpp_build_conf_obj_dpp()
1448 dpp_build_jwk(dppcon, "netAccessKey", auth->peer_protocol_key, NULL, in dpp_build_conf_obj_dpp()
1449 auth->curve) < 0) { in dpp_build_conf_obj_dpp()
1473 signed_conn = dpp_sign_connector(auth->conf, dppcon); in dpp_build_conf_obj_dpp()
1479 tailroom += 2 * curve->prime_len * 4 / 3 + os_strlen(auth->conf->kid); in dpp_build_conf_obj_dpp()
1483 buf = dpp_build_conf_start(auth, conf, tailroom); in dpp_build_conf_obj_dpp()
1487 if (auth->akm_use_selector && dpp_akm_ver2(akm)) in dpp_build_conf_obj_dpp()
1502 if (dpp_build_jwk(buf, "csign", auth->conf->csign, auth->conf->kid, in dpp_build_conf_obj_dpp()
1527 dpp_build_conf_obj_legacy(struct dpp_authentication *auth, in dpp_build_conf_obj_legacy() argument
1533 buf = dpp_build_conf_start(auth, conf, 1000); in dpp_build_conf_obj_legacy()
1537 if (auth->akm_use_selector && dpp_akm_ver2(conf->akm)) in dpp_build_conf_obj_legacy()
1556 dpp_build_conf_obj(struct dpp_authentication *auth, enum dpp_netrole netrole, in dpp_build_conf_obj() argument
1562 if (auth->config_obj_override) { in dpp_build_conf_obj()
1566 return wpabuf_alloc_copy(auth->config_obj_override, in dpp_build_conf_obj()
1567 os_strlen(auth->config_obj_override)); in dpp_build_conf_obj()
1573 conf = auth->conf_sta; in dpp_build_conf_obj()
1575 conf = auth->conf_ap; in dpp_build_conf_obj()
1578 conf = auth->conf2_sta; in dpp_build_conf_obj()
1580 conf = auth->conf2_ap; in dpp_build_conf_obj()
1590 if (dpp_akm_dpp(conf->akm) || (auth->peer_version >= 2 && auth->conf)) in dpp_build_conf_obj()
1591 return dpp_build_conf_obj_dpp(auth, conf); in dpp_build_conf_obj()
1592 return dpp_build_conf_obj_legacy(auth, conf); in dpp_build_conf_obj()
1597 dpp_build_conf_resp(struct dpp_authentication *auth, const u8 *e_nonce, in dpp_build_conf_resp() argument
1610 env_data = dpp_build_enveloped_data(auth); in dpp_build_conf_resp()
1613 conf = dpp_build_conf_obj(auth, netrole, 0); in dpp_build_conf_resp()
1618 conf2 = dpp_build_conf_obj(auth, netrole, 1); in dpp_build_conf_resp()
1623 auth->conf_resp_status = status; in dpp_build_conf_resp()
1633 if (auth->peer_version >= 2 && auth->send_conn_status && in dpp_build_conf_resp()
1683 if (auth->peer_version >= 2 && conf2) { in dpp_build_conf_resp()
1697 if (auth->peer_version >= 2 && auth->send_conn_status && in dpp_build_conf_resp()
1732 if (aes_siv_encrypt(auth->ke, auth->curve->hash_len, in dpp_build_conf_resp()
1764 dpp_conf_req_rx(struct dpp_authentication *auth, const u8 *attr_start, in dpp_conf_req_rx() argument
1784 dpp_auth_fail(auth, "Invalid attribute in config request"); in dpp_conf_req_rx()
1791 dpp_auth_fail(auth, in dpp_conf_req_rx()
1802 if (aes_siv_decrypt(auth->ke, auth->curve->hash_len, in dpp_conf_req_rx()
1805 dpp_auth_fail(auth, "AES-SIV decryption failed"); in dpp_conf_req_rx()
1812 dpp_auth_fail(auth, "Invalid attribute in unwrapped data"); in dpp_conf_req_rx()
1819 if (!e_nonce || e_nonce_len != auth->curve->nonce_len) { in dpp_conf_req_rx()
1820 dpp_auth_fail(auth, in dpp_conf_req_rx()
1825 os_memcpy(auth->e_nonce, e_nonce, e_nonce_len); in dpp_conf_req_rx()
1831 dpp_auth_fail(auth, in dpp_conf_req_rx()
1840 dpp_auth_fail(auth, "Could not parse Config Attributes"); in dpp_conf_req_rx()
1846 dpp_auth_fail(auth, "No Config Attributes - name"); in dpp_conf_req_rx()
1853 dpp_auth_fail(auth, "No Config Attributes - wi-fi_tech"); in dpp_conf_req_rx()
1860 dpp_auth_fail(auth, "Unsupported wi-fi_tech"); in dpp_conf_req_rx()
1866 dpp_auth_fail(auth, "No Config Attributes - netRole"); in dpp_conf_req_rx()
1879 dpp_auth_fail(auth, "Unsupported netRole"); in dpp_conf_req_rx()
1886 wpa_msg(auth->msg_ctx, MSG_INFO, DPP_EVENT_MUD_URL "%s", in dpp_conf_req_rx()
1891 auth->band_list_size = 0; in dpp_conf_req_rx()
1897 memset(auth->band_list, 0, sizeof(auth->band_list)); in dpp_conf_req_rx()
1905 if (auth->band_list_size < DPP_MAX_CHANNELS) { in dpp_conf_req_rx()
1906 auth->band_list[auth->band_list_size++] = token->number; in dpp_conf_req_rx()
1929 wpa_msg(auth->msg_ctx, MSG_INFO, DPP_EVENT_BAND_SUPPORT "%s", in dpp_conf_req_rx()
1933 resp = dpp_build_conf_resp(auth, e_nonce, e_nonce_len, netrole); in dpp_conf_req_rx()
2147 static int dpp_parse_connector(struct dpp_authentication *auth, in dpp_parse_connector() argument
2203 &auth->net_access_key_expiry)) { in dpp_parse_connector()
2221 if (EVP_PKEY_cmp(key, auth->own_protocol_key) != 1) { in dpp_parse_connector()
2225 if (auth->ignore_netaccesskey_mismatch) { in dpp_parse_connector()
2258 static void dpp_copy_netaccesskey(struct dpp_authentication *auth, in dpp_copy_netaccesskey() argument
2266 own_key = auth->own_protocol_key; in dpp_copy_netaccesskey()
2268 if (auth->reconfig_connector_key == DPP_CONFIG_REUSEKEY && in dpp_copy_netaccesskey()
2269 auth->reconfig_old_protocol_key) in dpp_copy_netaccesskey()
2270 own_key = auth->reconfig_old_protocol_key; in dpp_copy_netaccesskey()
2281 wpabuf_free(auth->net_access_key); in dpp_copy_netaccesskey()
2282 auth->net_access_key = wpabuf_alloc_copy(der, der_len); in dpp_copy_netaccesskey()
2288 static int dpp_parse_cred_dpp(struct dpp_authentication *auth, in dpp_parse_cred_dpp() argument
2343 if (dpp_parse_connector(auth, conf, in dpp_parse_cred_dpp()
2353 if (dpp_akm_dpp(conf->akm) || auth->peer_version >= 2) in dpp_parse_cred_dpp()
2354 dpp_copy_netaccesskey(auth, conf); in dpp_parse_cred_dpp()
2459 static int dpp_parse_conf_obj(struct dpp_authentication *auth, in dpp_parse_conf_obj() argument
2472 dpp_auth_fail(auth, "JSON root is not an object"); in dpp_parse_conf_obj()
2478 dpp_auth_fail(auth, "No wi-fi_tech string value found"); in dpp_parse_conf_obj()
2484 dpp_auth_fail(auth, "Unsupported wi-fi_tech value"); in dpp_parse_conf_obj()
2490 dpp_auth_fail(auth, "No discovery object in JSON"); in dpp_parse_conf_obj()
2499 dpp_auth_fail(auth, "Too long discovery::ssid64 value"); in dpp_parse_conf_obj()
2505 dpp_auth_fail(auth, in dpp_parse_conf_obj()
2512 dpp_auth_fail(auth, in dpp_parse_conf_obj()
2518 if (auth->num_conf_obj == DPP_MAX_CONF_OBJ) { in dpp_parse_conf_obj()
2524 conf = &auth->conf_obj[auth->num_conf_obj++]; in dpp_parse_conf_obj()
2543 dpp_auth_fail(auth, "No cred object in JSON"); in dpp_parse_conf_obj()
2549 dpp_auth_fail(auth, "No cred::akm string value found"); in dpp_parse_conf_obj()
2555 if (legacy && auth->peer_version >= 2) { in dpp_parse_conf_obj()
2568 (auth->peer_version >= 2 && dpp_akm_legacy(conf->akm))) { in dpp_parse_conf_obj()
2569 if (dpp_parse_cred_dpp(auth, conf, cred) < 0) in dpp_parse_conf_obj()
2574 dpp_auth_fail(auth, "Unsupported akm"); in dpp_parse_conf_obj()
2587 int dpp_conf_resp_rx(struct dpp_authentication *auth, in dpp_conf_resp_rx() argument
2600 auth->conf_resp_status = 255; in dpp_conf_resp_rx()
2603 dpp_auth_fail(auth, "Invalid attribute in config response"); in dpp_conf_resp_rx()
2611 dpp_auth_fail(auth, in dpp_conf_resp_rx()
2627 if (aes_siv_decrypt(auth->ke, auth->curve->hash_len, in dpp_conf_resp_rx()
2630 dpp_auth_fail(auth, "AES-SIV decryption failed"); in dpp_conf_resp_rx()
2637 dpp_auth_fail(auth, "Invalid attribute in unwrapped data"); in dpp_conf_resp_rx()
2644 if (!e_nonce || e_nonce_len != auth->curve->nonce_len) { in dpp_conf_resp_rx()
2645 dpp_auth_fail(auth, in dpp_conf_resp_rx()
2650 if (os_memcmp(e_nonce, auth->e_nonce, e_nonce_len) != 0) { in dpp_conf_resp_rx()
2651 dpp_auth_fail(auth, "Enrollee Nonce mismatch"); in dpp_conf_resp_rx()
2658 dpp_auth_fail(auth, in dpp_conf_resp_rx()
2662 auth->conf_resp_status = status[0]; in dpp_conf_resp_rx()
2665 dpp_auth_fail(auth, "Configurator rejected configuration"); in dpp_conf_resp_rx()
2673 dpp_conf_resp_env_data(auth, env_data, env_data_len) < 0) in dpp_conf_resp_rx()
2680 dpp_auth_fail(auth, in dpp_conf_resp_rx()
2687 if (dpp_parse_conf_obj(auth, conf_obj, conf_obj_len) < 0) in dpp_conf_resp_rx()
2700 auth->conn_status_requested = 1; in dpp_conf_resp_rx()
2714 enum dpp_status_error dpp_conf_result_rx(struct dpp_authentication *auth, in dpp_conf_result_rx() argument
2729 dpp_auth_fail(auth, in dpp_conf_result_rx()
2750 if (aes_siv_decrypt(auth->ke, auth->curve->hash_len, in dpp_conf_result_rx()
2753 dpp_auth_fail(auth, "AES-SIV decryption failed"); in dpp_conf_result_rx()
2760 dpp_auth_fail(auth, "Invalid attribute in unwrapped data"); in dpp_conf_result_rx()
2767 if (!e_nonce || e_nonce_len != auth->curve->nonce_len) { in dpp_conf_result_rx()
2768 dpp_auth_fail(auth, in dpp_conf_result_rx()
2773 if (os_memcmp(e_nonce, auth->e_nonce, e_nonce_len) != 0) { in dpp_conf_result_rx()
2774 dpp_auth_fail(auth, "Enrollee Nonce mismatch"); in dpp_conf_result_rx()
2776 auth->e_nonce, e_nonce_len); in dpp_conf_result_rx()
2783 dpp_auth_fail(auth, in dpp_conf_result_rx()
2796 struct wpabuf * dpp_build_conf_result(struct dpp_authentication *auth, in dpp_build_conf_result() argument
2805 nonce_len = auth->curve->nonce_len; in dpp_build_conf_result()
2819 wpabuf_put_data(clear, auth->e_nonce, nonce_len); in dpp_build_conf_result()
2837 if (aes_siv_encrypt(auth->ke, auth->curve->hash_len, in dpp_build_conf_result()
2865 enum dpp_status_error dpp_conn_status_result_rx(struct dpp_authentication *auth, in dpp_conn_status_result_rx() argument
2888 dpp_auth_fail(auth, in dpp_conn_status_result_rx()
2909 if (aes_siv_decrypt(auth->ke, auth->curve->hash_len, in dpp_conn_status_result_rx()
2912 dpp_auth_fail(auth, "AES-SIV decryption failed"); in dpp_conn_status_result_rx()
2919 dpp_auth_fail(auth, "Invalid attribute in unwrapped data"); in dpp_conn_status_result_rx()
2926 if (!e_nonce || e_nonce_len != auth->curve->nonce_len) { in dpp_conn_status_result_rx()
2927 dpp_auth_fail(auth, in dpp_conn_status_result_rx()
2932 if (os_memcmp(e_nonce, auth->e_nonce, e_nonce_len) != 0) { in dpp_conn_status_result_rx()
2933 dpp_auth_fail(auth, "Enrollee Nonce mismatch"); in dpp_conn_status_result_rx()
2935 auth->e_nonce, e_nonce_len); in dpp_conn_status_result_rx()
2942 dpp_auth_fail(auth, in dpp_conn_status_result_rx()
2951 dpp_auth_fail(auth, "Could not parse connStatus"); in dpp_conn_status_result_rx()
2969 dpp_auth_fail(auth, "No connStatus - result"); in dpp_conn_status_result_rx()
3012 struct wpabuf * dpp_build_conn_status_result(struct dpp_authentication *auth, in dpp_build_conn_status_result() argument
3027 nonce_len = auth->curve->nonce_len; in dpp_build_conn_status_result()
3038 wpabuf_put_data(clear, auth->e_nonce, nonce_len); in dpp_build_conn_status_result()
3061 if (aes_siv_encrypt(auth->ke, auth->curve->hash_len, in dpp_build_conn_status_result()
3182 int dpp_configurator_own_config(struct dpp_authentication *auth, in dpp_configurator_own_config() argument
3188 if (!auth->conf) { in dpp_configurator_own_config()
3193 auth->curve = dpp_get_curve_name(curve); in dpp_configurator_own_config()
3194 if (!auth->curve) { in dpp_configurator_own_config()
3201 auth->curve->name); in dpp_configurator_own_config()
3203 auth->own_protocol_key = dpp_gen_keypair(auth->curve); in dpp_configurator_own_config()
3204 if (!auth->own_protocol_key) in dpp_configurator_own_config()
3206 dpp_copy_netaccesskey(auth, &auth->conf_obj[0]); in dpp_configurator_own_config()
3207 auth->peer_protocol_key = auth->own_protocol_key; in dpp_configurator_own_config()
3208 dpp_copy_csign(&auth->conf_obj[0], auth->conf->csign); in dpp_configurator_own_config()
3210 conf_obj = dpp_build_conf_obj(auth, ap, 0); in dpp_configurator_own_config()
3212 wpabuf_free(auth->conf_obj[0].c_sign_key); in dpp_configurator_own_config()
3213 auth->conf_obj[0].c_sign_key = NULL; in dpp_configurator_own_config()
3216 ret = dpp_parse_conf_obj(auth, wpabuf_head(conf_obj), in dpp_configurator_own_config()
3220 auth->peer_protocol_key = NULL; in dpp_configurator_own_config()