/hostap-latest/src/wps/ |
D | wps_attr_process.c | 84 static int wps_process_cred_network_idx(struct wps_credential *cred, in wps_process_cred_network_idx() argument 99 static int wps_process_cred_ssid(struct wps_credential *cred, const u8 *ssid, in wps_process_cred_ssid() argument 113 if (ssid_len <= sizeof(cred->ssid)) { in wps_process_cred_ssid() 114 os_memcpy(cred->ssid, ssid, ssid_len); in wps_process_cred_ssid() 115 cred->ssid_len = ssid_len; in wps_process_cred_ssid() 122 static int wps_process_cred_auth_type(struct wps_credential *cred, in wps_process_cred_auth_type() argument 131 cred->auth_type = WPA_GET_BE16(auth_type); in wps_process_cred_auth_type() 133 cred->auth_type); in wps_process_cred_auth_type() 139 static int wps_process_cred_encr_type(struct wps_credential *cred, in wps_process_cred_encr_type() argument 148 cred->encr_type = WPA_GET_BE16(encr_type); in wps_process_cred_encr_type() [all …]
|
D | wps_registrar.c | 1524 const struct wps_credential *cred) in wps_build_cred_network_idx() argument 1535 const struct wps_credential *cred) in wps_build_cred_ssid() argument 1539 cred->ssid, cred->ssid_len); in wps_build_cred_ssid() 1541 wpabuf_put_be16(msg, cred->ssid_len); in wps_build_cred_ssid() 1542 wpabuf_put_data(msg, cred->ssid, cred->ssid_len); in wps_build_cred_ssid() 1548 const struct wps_credential *cred) in wps_build_cred_auth_type() argument 1551 cred->auth_type); in wps_build_cred_auth_type() 1554 wpabuf_put_be16(msg, cred->auth_type); in wps_build_cred_auth_type() 1560 const struct wps_credential *cred) in wps_build_cred_encr_type() argument 1563 cred->encr_type); in wps_build_cred_encr_type() [all …]
|
D | wps_enrollee.c | 704 static int wps_process_cred_e(struct wps_data *wps, const u8 *cred, in wps_process_cred_e() argument 712 os_memset(&wps->cred, 0, sizeof(wps->cred)); in wps_process_cred_e() 713 wpabuf_set(&msg, cred, cred_len); in wps_process_cred_e() 715 wps_process_cred(&attr, &wps->cred)) in wps_process_cred_e() 718 if (!ether_addr_equal(wps->cred.mac_addr, wps->wps->dev.mac_addr)) { in wps_process_cred_e() 721 ")", MAC2STR(wps->cred.mac_addr), in wps_process_cred_e() 739 if (!(wps->cred.encr_type & in wps_process_cred_e() 741 if (wps->cred.encr_type & WPS_ENCR_WEP) { in wps_process_cred_e() 749 "invalid encr_type 0x%x", wps->cred.encr_type); in wps_process_cred_e() 754 wps->cred.cred_attr = cred - 4; in wps_process_cred_e() [all …]
|
D | wps_common.c | 385 struct wps_credential cred; in wps_get_oob_cred() local 390 os_memset(&cred, 0, sizeof(cred)); in wps_get_oob_cred() 391 os_memcpy(cred.ssid, wps->ssid, wps->ssid_len); in wps_get_oob_cred() 392 cred.ssid_len = wps->ssid_len; in wps_get_oob_cred() 393 cred.auth_type = WPS_AUTH_WPAPSK | WPS_AUTH_WPA2PSK; in wps_get_oob_cred() 394 cred.encr_type = WPS_ENCR_TKIP | WPS_ENCR_AES; in wps_get_oob_cred() 395 os_memcpy(cred.key, data.new_psk, data.new_psk_len); in wps_get_oob_cred() 396 cred.key_len = data.new_psk_len; in wps_get_oob_cred() 403 wps->cred_cb(wps->cb_ctx, &cred); in wps_get_oob_cred() 445 wpabuf_set(&msg, attr->cred[i], attr->cred_len[i]); in wps_oob_use_cred()
|
D | wps_er.c | 86 os_free(sta->cred); in wps_er_sta_free() 1053 os_free(sta->cred); in wps_er_sta_start() 1054 sta->cred = os_malloc(sizeof(*sta->cred)); in wps_er_sta_start() 1055 if (sta->cred) { in wps_er_sta_start() 1056 os_memcpy(sta->cred, sta->ap->ap_settings, in wps_er_sta_start() 1057 sizeof(*sta->cred)); in wps_er_sta_start() 1058 sta->cred->cred_attr = NULL; in wps_er_sta_start() 1059 os_memcpy(sta->cred->mac_addr, sta->addr, ETH_ALEN); in wps_er_sta_start() 1060 sta->wps->use_cred = sta->cred; in wps_er_sta_start() 1606 static void wps_er_ap_settings_cb(void *ctx, const struct wps_credential *cred) in wps_er_ap_settings_cb() argument [all …]
|
D | wps.h | 605 const struct wps_credential *cred; member 817 int (*cred_cb)(void *ctx, const struct wps_credential *cred); 876 struct wps_credential *cred); 892 const struct wps_credential *cred); 917 const struct wps_credential *cred); 920 const struct wps_credential *cred); 922 struct wps_credential *cred);
|
D | wps_i.h | 100 struct wps_credential cred; member 117 void (*ap_settings_cb)(void *ctx, const struct wps_credential *cred); 192 struct wps_credential *cred); 194 struct wps_credential *cred);
|
/hostap-latest/wpa_supplicant/ |
D | interworking.c | 144 struct wpa_cred *cred; in cred_with_roaming_consortium() local 146 for (cred = wpa_s->conf->cred; cred; cred = cred->next) { in cred_with_roaming_consortium() 147 if (cred->num_home_ois) in cred_with_roaming_consortium() 149 if (cred->num_required_home_ois) in cred_with_roaming_consortium() 151 if (cred->num_roaming_consortiums) in cred_with_roaming_consortium() 160 struct wpa_cred *cred; in cred_with_3gpp() local 162 for (cred = wpa_s->conf->cred; cred; cred = cred->next) { in cred_with_3gpp() 163 if (cred->pcsc || cred->imsi) in cred_with_3gpp() 172 struct wpa_cred *cred; in cred_with_nai_realm() local 174 for (cred = wpa_s->conf->cred; cred; cred = cred->next) { in cred_with_nai_realm() [all …]
|
D | config_file.c | 162 struct wpa_cred *cred; in wpa_config_read_cred() local 167 cred = os_zalloc(sizeof(*cred)); in wpa_config_read_cred() 168 if (cred == NULL) in wpa_config_read_cred() 170 cred->id = id; in wpa_config_read_cred() 171 cred->sim_num = DEFAULT_USER_SELECTED_SIM; in wpa_config_read_cred() 197 if (wpa_config_set_cred(cred, pos, pos2, *line) < 0) in wpa_config_read_cred() 208 wpa_config_free_cred(cred); in wpa_config_read_cred() 209 cred = NULL; in wpa_config_read_cred() 212 return cred; in wpa_config_read_cred() 306 struct wpa_cred *cred, *cred_tail, *cred_head; in wpa_config_read() local [all …]
|
D | config.c | 2967 void wpa_config_free_cred(struct wpa_cred *cred) in wpa_config_free_cred() argument 2971 os_free(cred->realm); in wpa_config_free_cred() 2972 str_clear_free(cred->username); in wpa_config_free_cred() 2973 str_clear_free(cred->password); in wpa_config_free_cred() 2974 os_free(cred->ca_cert); in wpa_config_free_cred() 2975 os_free(cred->client_cert); in wpa_config_free_cred() 2976 os_free(cred->private_key); in wpa_config_free_cred() 2977 str_clear_free(cred->private_key_passwd); in wpa_config_free_cred() 2978 os_free(cred->engine_id); in wpa_config_free_cred() 2979 os_free(cred->ca_cert_id); in wpa_config_free_cred() [all …]
|
D | wps_supplicant.c | 195 const struct wps_credential *cred) in wpas_wps_security_workaround() argument 217 bss = wpa_bss_get(wpa_s, cred->mac_addr, ssid->ssid, ssid->ssid_len); in wpas_wps_security_workaround() 375 const struct wps_credential *cred) in wpa_supplicant_wps_cred() argument 386 wpa_s->conf->wps_cred_processing == 2) && cred->cred_attr) { in wpa_supplicant_wps_cred() 387 size_t blen = cred->cred_attr_len * 2 + 1; in wpa_supplicant_wps_cred() 391 cred->cred_attr, cred->cred_attr_len); in wpa_supplicant_wps_cred() 397 wpas_notify_wps_credential(wpa_s, cred); in wpa_supplicant_wps_cred() 402 cred->cred_attr, cred->cred_attr_len); in wpa_supplicant_wps_cred() 407 wpa_hexdump_ascii(MSG_DEBUG, "WPS: SSID", cred->ssid, cred->ssid_len); in wpa_supplicant_wps_cred() 409 cred->auth_type); in wpa_supplicant_wps_cred() [all …]
|
D | config.h | 478 struct wpa_cred *cred; member 1850 void wpa_config_free_cred(struct wpa_cred *cred); 1851 int wpa_config_set_cred(struct wpa_cred *cred, const char *var, 1853 char * wpa_config_get_cred_no_key(struct wpa_cred *cred, const char *var);
|
D | notify.c | 295 const struct wps_credential *cred) in wpas_notify_wps_credential() argument 302 wpas_dbus_signal_wps_cred(wpa_s, cred); in wpas_notify_wps_credential() 1005 struct wpa_cred *cred, int excluded, in wpas_notify_interworking_ap_added() argument 1015 cred->id, cred->priority, cred->sp_priority); in wpas_notify_interworking_ap_added() 1017 wpas_dbus_signal_interworking_ap_added(wpa_s, bss, cred, type, excluded, in wpas_notify_interworking_ap_added()
|
/hostap-latest/src/tls/ |
D | tlsv1_cred.c | 23 struct tlsv1_credentials *cred; in tlsv1_cred_alloc() local 24 cred = os_zalloc(sizeof(*cred)); in tlsv1_cred_alloc() 25 return cred; in tlsv1_cred_alloc() 29 void tlsv1_cred_free(struct tlsv1_credentials *cred) in tlsv1_cred_free() argument 31 if (cred == NULL) in tlsv1_cred_free() 34 x509_certificate_chain_free(cred->trusted_certs); in tlsv1_cred_free() 35 x509_certificate_chain_free(cred->cert); in tlsv1_cred_free() 36 crypto_private_key_free(cred->key); in tlsv1_cred_free() 37 os_free(cred->dh_p); in tlsv1_cred_free() 38 os_free(cred->dh_g); in tlsv1_cred_free() [all …]
|
D | tlsv1_cred.h | 34 void tlsv1_cred_free(struct tlsv1_credentials *cred); 35 int tlsv1_set_ca_cert(struct tlsv1_credentials *cred, const char *cert, 38 int tlsv1_set_cert(struct tlsv1_credentials *cred, const char *cert, 40 int tlsv1_set_private_key(struct tlsv1_credentials *cred, 45 int tlsv1_set_dhparams(struct tlsv1_credentials *cred, const char *dh_file,
|
D | tlsv1_server_write.c | 29 cert = conn->cred ? conn->cred->cert : NULL; in tls_server_cert_chain_der_len() 34 cert = x509_certificate_get_subject(conn->cred->trusted_certs, in tls_server_cert_chain_der_len() 228 cert = conn->cred->cert; in tls_write_server_certificate() 246 cert = x509_certificate_get_subject(conn->cred->trusted_certs, in tls_write_server_certificate() 249 if (cert == conn->cred->cert || cert == NULL) { in tls_write_server_certificate() 397 if (conn->cred == NULL || conn->cred->dh_p == NULL || in tls_write_server_key_exchange() 398 conn->cred->dh_g == NULL) { in tls_write_server_key_exchange() 450 if (crypto_mod_exp(conn->cred->dh_g, conn->cred->dh_g_len, in tls_write_server_key_exchange() 514 if (2 + conn->cred->dh_g_len > (size_t) (end - pos)) { in tls_write_server_key_exchange() 522 WPA_PUT_BE16(pos, conn->cred->dh_g_len); in tls_write_server_key_exchange() [all …]
|
D | tlsv1_client_write.c | 29 if (conn->cred == NULL) in tls_client_cert_chain_der_len() 32 cert = conn->cred->cert; in tls_client_cert_chain_der_len() 37 cert = x509_certificate_get_subject(conn->cred->trusted_certs, in tls_client_cert_chain_der_len() 283 cert = conn->cred ? conn->cred->cert : NULL; in tls_write_client_certificate() 301 cert = x509_certificate_get_subject(conn->cred->trusted_certs, in tls_write_client_certificate() 304 if (conn->cred == NULL || cert == conn->cred->cert || cert == NULL) { in tls_write_client_certificate() 704 if (conn->cred == NULL || in tls_write_client_certificate_verify() 705 crypto_private_key_sign_pkcs1(conn->cred->key, hash, hlen, in tls_write_client_certificate_verify() 887 (conn->certificate_requested && conn->cred && conn->cred->key && in tls_send_client_key_exchange()
|
D | tlsv1_client_read.c | 293 if ((conn->cred && conn->cred->cert_probe) || conn->cert_in_cb) { in tls_peer_cert_event() 509 if (conn->cred && conn->cred->server_cert_only && chain) { in tls_process_certificate() 519 os_memcmp(conn->cred->srv_cert_hash, hash, in tls_process_certificate() 541 } else if (conn->cred && conn->cred->cert_probe) { in tls_process_certificate() 564 } else if (conn->cred && conn->cred->ca_cert_verify && in tls_process_certificate() 566 conn->cred->trusted_certs, chain, &reason, in tls_process_certificate() 612 if (conn->cred && !conn->cred->server_cert_only && chain && in tls_process_certificate()
|
D | tlsv1_server.c | 377 struct tlsv1_server * tlsv1_server_init(struct tlsv1_credentials *cred) in tlsv1_server_init() argument 387 conn->cred = cred; in tlsv1_server_init() 841 *dh_p = conn->cred->dh_p; in tlsv1_server_get_dh_p() 842 *dh_p_len = conn->cred->dh_p_len; in tlsv1_server_get_dh_p()
|
/hostap-latest/src/ap/ |
D | wps_hostapd.c | 354 const struct wps_credential *cred) in hapd_wps_reconfig_in_memory() argument 361 if (cred->ssid_len <= SSID_MAX_LEN) { in hapd_wps_reconfig_in_memory() 362 os_memcpy(bss->ssid.ssid, cred->ssid, cred->ssid_len); in hapd_wps_reconfig_in_memory() 363 bss->ssid.ssid_len = cred->ssid_len; in hapd_wps_reconfig_in_memory() 368 if (cred->auth_type & (WPS_AUTH_WPA2 | WPS_AUTH_WPA2PSK | in hapd_wps_reconfig_in_memory() 374 if ((cred->auth_type & (WPS_AUTH_WPA2 | WPS_AUTH_WPA2PSK)) && in hapd_wps_reconfig_in_memory() 375 (cred->auth_type & (WPS_AUTH_WPA | WPS_AUTH_WPAPSK))) in hapd_wps_reconfig_in_memory() 377 else if (cred->auth_type & (WPS_AUTH_WPA2 | WPS_AUTH_WPA2PSK)) in hapd_wps_reconfig_in_memory() 379 else if (cred->auth_type & (WPS_AUTH_WPA | WPS_AUTH_WPAPSK)) in hapd_wps_reconfig_in_memory() 386 if (cred->auth_type & (WPS_AUTH_WPA2 | WPS_AUTH_WPA)) in hapd_wps_reconfig_in_memory() [all …]
|
/hostap-latest/src/crypto/ |
D | tls_internal.c | 206 struct tlsv1_credentials *cred; in tls_connection_set_params() local 217 cred = tlsv1_cred_alloc(); in tls_connection_set_params() 218 if (cred == NULL) in tls_connection_set_params() 223 tlsv1_cred_free(cred); in tls_connection_set_params() 229 tlsv1_cred_free(cred); in tls_connection_set_params() 235 tlsv1_cred_free(cred); in tls_connection_set_params() 241 tlsv1_cred_free(cred); in tls_connection_set_params() 247 tlsv1_cred_free(cred); in tls_connection_set_params() 253 tlsv1_cred_free(cred); in tls_connection_set_params() 257 if (tlsv1_set_ca_cert(cred, params->ca_cert, in tls_connection_set_params() [all …]
|
/hostap-latest/src/eap_peer/ |
D | eap_wsc.c | 58 static int eap_wsc_new_ap_settings(struct wps_credential *cred, in eap_wsc_new_ap_settings() argument 64 os_memset(cred, 0, sizeof(*cred)); in eap_wsc_new_ap_settings() 75 if ((len & 1) || len > 2 * sizeof(cred->ssid) || in eap_wsc_new_ap_settings() 76 hexstr2bin(pos, cred->ssid, len / 2)) { in eap_wsc_new_ap_settings() 80 cred->ssid_len = len / 2; in eap_wsc_new_ap_settings() 88 cred->auth_type = WPS_AUTH_OPEN; in eap_wsc_new_ap_settings() 90 cred->auth_type = WPS_AUTH_WPAPSK; in eap_wsc_new_ap_settings() 92 cred->auth_type = WPS_AUTH_WPA2PSK; in eap_wsc_new_ap_settings() 104 cred->encr_type = WPS_ENCR_NONE; in eap_wsc_new_ap_settings() 107 cred->encr_type = WPS_ENCR_WEP; in eap_wsc_new_ap_settings() [all …]
|
/hostap-latest/hs20/server/ |
D | spp_server.c | 649 static int add_username_password(struct hs20_svc *ctx, xml_node_t *cred, in add_username_password() argument 655 node = build_username_password(ctx, cred, user, pw); in add_username_password() 668 static void add_creation_date(struct hs20_svc *ctx, xml_node_t *cred) in add_creation_date() argument 679 xml_node_create_text(ctx->xml, cred, NULL, "CreationDate", str); in add_creation_date() 687 xml_node_t *cred; in build_credential_pw() local 689 cred = xml_node_create_root(ctx->xml, NULL, NULL, NULL, "Credential"); in build_credential_pw() 690 if (cred == NULL) { in build_credential_pw() 694 add_creation_date(ctx, cred); in build_credential_pw() 695 if (add_username_password(ctx, cred, user, pw, machine_managed) < 0) { in build_credential_pw() 696 xml_node_free(ctx->xml, cred); in build_credential_pw() [all …]
|
/hostap-latest/wpadebug/src/w1/fi/wpadebug/ |
D | WpaCredActivity.java | 106 for (String cred: creds) { in onCreate() 107 if (Character.isDigit(cred.charAt(0))) in onCreate() 108 mList.add(new Credential(cred)); in onCreate() 210 Credential cred = (Credential) getListAdapter().getItem(info.position); in onContextItemSelected() local 211 String res = run("REMOVE_CRED " + cred.id); in onContextItemSelected() 216 mListAdapter.remove(cred); in onContextItemSelected()
|
/hostap-latest/wpa_supplicant/examples/ |
D | wpas-dbus-new-wps.py | 33 def credentials(cred): argument 34 print("WPS credentials: %s" % (cred))
|