Home | History | Annotate | Download | only in wpa_supplicant

Lines Matching refs:cred

225 	struct wpa_cred *cred;
229 wpa_printf(MSG_MSGDUMP, "Line: %d - start of a new cred block", *line);
230 cred = os_zalloc(sizeof(*cred));
231 if (cred == NULL)
233 cred->id = id;
234 cred->sim_num = DEFAULT_USER_SELECTED_SIM;
244 wpa_printf(MSG_ERROR, "Line %d: Invalid cred line "
260 if (wpa_config_set_cred(cred, pos, pos2, *line) < 0)
265 wpa_printf(MSG_ERROR, "Line %d: cred block was not "
271 wpa_config_free_cred(cred);
272 cred = NULL;
275 return cred;
368 struct wpa_cred *cred, *cred_tail, *cred_head;
387 cred_tail = cred_head = config->cred;
422 } else if (os_strcmp(pos, "cred={") == 0) {
423 cred = wpa_config_read_cred(f, &line, cred_id++);
424 if (cred == NULL) {
426 "parse cred block.", line);
431 cred_head = cred_tail = cred;
433 cred_tail->next = cred;
434 cred_tail = cred;
458 config->cred = cred_head;
827 static void wpa_config_write_cred(FILE *f, struct wpa_cred *cred)
831 if (cred->priority)
832 fprintf(f, "\tpriority=%d\n", cred->priority);
833 if (cred->pcsc)
834 fprintf(f, "\tpcsc=%d\n", cred->pcsc);
835 if (cred->realm)
836 fprintf(f, "\trealm=\"%s\"\n", cred->realm);
837 if (cred->username)
838 fprintf(f, "\tusername=\"%s\"\n", cred->username);
839 if (cred->password && cred->ext_password)
840 fprintf(f, "\tpassword=ext:%s\n", cred->password);
841 else if (cred->password)
842 fprintf(f, "\tpassword=\"%s\"\n", cred->password);
843 if (cred->ca_cert)
844 fprintf(f, "\tca_cert=\"%s\"\n", cred->ca_cert);
845 if (cred->client_cert)
846 fprintf(f, "\tclient_cert=\"%s\"\n", cred->client_cert);
847 if (cred->private_key)
848 fprintf(f, "\tprivate_key=\"%s\"\n", cred->private_key);
849 if (cred->private_key_passwd)
851 cred->private_key_passwd);
852 if (cred->imsi)
853 fprintf(f, "\timsi=\"%s\"\n", cred->imsi);
854 if (cred->milenage)
855 fprintf(f, "\tmilenage=\"%s\"\n", cred->milenage);
856 for (i = 0; i < cred->num_domain; i++)
857 fprintf(f, "\tdomain=\"%s\"\n", cred->domain[i]);
858 if (cred->domain_suffix_match)
860 cred->domain_suffix_match);
861 if (cred->roaming_consortium_len) {
863 for (i = 0; i < cred->roaming_consortium_len; i++)
864 fprintf(f, "%02x", cred->roaming_consortium[i]);
867 if (cred->eap_method) {
869 name = eap_get_name(cred->eap_method[0].vendor,
870 cred->eap_method[0].method);
874 if (cred->phase1)
875 fprintf(f, "\tphase1=\"%s\"\n", cred->phase1);
876 if (cred->phase2)
877 fprintf(f, "\tphase2=\"%s\"\n", cred->phase2);
878 if (cred->excluded_ssid) {
880 for (i = 0; i < cred->num_excluded_ssid; i++) {
881 struct excluded_ssid *e = &cred->excluded_ssid[i];
888 if (cred->roaming_partner) {
889 for (i = 0; i < cred->num_roaming_partner; i++) {
890 struct roaming_partner *p = &cred->roaming_partner[i];
896 if (cred->update_identifier)
897 fprintf(f, "\tupdate_identifier=%d\n", cred->update_identifier);
899 if (cred->provisioning_sp)
900 fprintf(f, "\tprovisioning_sp=\"%s\"\n", cred->provisioning_sp);
901 if (cred->sp_priority)
902 fprintf(f, "\tsp_priority=%d\n", cred->sp_priority);
904 if (cred->min_dl_bandwidth_home)
906 cred->min_dl_bandwidth_home);
907 if (cred->min_ul_bandwidth_home)
909 cred->min_ul_bandwidth_home);
910 if (cred->min_dl_bandwidth_roaming)
912 cred->min_dl_bandwidth_roaming);
913 if (cred->min_ul_bandwidth_roaming)
915 cred->min_ul_bandwidth_roaming);
917 if (cred->max_bss_load)
919 cred->max_bss_load);
921 if (cred->ocsp)
922 fprintf(f, "\tocsp=%d\n", cred->ocsp);
924 if (cred->num_req_conn_capab) {
925 for (i = 0; i < cred->num_req_conn_capab; i++) {
929 cred->req_conn_capab_proto[i]);
930 ports = cred->req_conn_capab_port[i];
942 if (cred->required_roaming_consortium_len) {
944 for (i = 0; i < cred->required_roaming_consortium_len; i++)
946 cred->required_roaming_consortium[i]);
950 if (cred->sim_num != DEFAULT_USER_SELECTED_SIM)
951 fprintf(f, "\tsim_num=%d\n", cred->sim_num);
1348 struct wpa_cred *cred;
1373 for (cred = config->cred; cred; cred = cred->next) {
1374 if (cred->temporary)
1377 wpa_config_write_cred(f, cred);