Home | History | Annotate | Download | only in wpa_supplicant

Lines Matching refs:cred

229 	struct wpa_cred *cred;
233 wpa_printf(MSG_MSGDUMP, "Line: %d - start of a new cred block", *line);
234 cred = os_zalloc(sizeof(*cred));
235 if (cred == NULL)
237 cred->id = id;
238 cred->sim_num = DEFAULT_USER_SELECTED_SIM;
248 wpa_printf(MSG_ERROR, "Line %d: Invalid cred line "
264 if (wpa_config_set_cred(cred, pos, pos2, *line) < 0)
269 wpa_printf(MSG_ERROR, "Line %d: cred block was not "
275 wpa_config_free_cred(cred);
276 cred = NULL;
279 return cred;
372 struct wpa_cred *cred, *cred_tail, *cred_head;
391 cred_tail = cred_head = config->cred;
427 } else if (os_strcmp(pos, "cred={") == 0) {
428 cred = wpa_config_read_cred(f, &line, cred_id++);
429 if (cred == NULL) {
431 "parse cred block.", line);
436 cred_head = cred_tail = cred;
438 cred_tail->next = cred;
439 cred_tail = cred;
463 config->cred = cred_head;
917 static void wpa_config_write_cred(FILE *f, struct wpa_cred *cred)
921 if (cred->priority)
922 fprintf(f, "\tpriority=%d\n", cred->priority);
923 if (cred->pcsc)
924 fprintf(f, "\tpcsc=%d\n", cred->pcsc);
925 if (cred->realm)
926 fprintf(f, "\trealm=\"%s\"\n", cred->realm);
927 if (cred->username)
928 fprintf(f, "\tusername=\"%s\"\n", cred->username);
929 if (cred->password && cred->ext_password)
930 fprintf(f, "\tpassword=ext:%s\n", cred->password);
931 else if (cred->password)
932 fprintf(f, "\tpassword=\"%s\"\n", cred->password);
933 if (cred->ca_cert)
934 fprintf(f, "\tca_cert=\"%s\"\n", cred->ca_cert);
935 if (cred->client_cert)
936 fprintf(f, "\tclient_cert=\"%s\"\n", cred->client_cert);
937 if (cred->private_key)
938 fprintf(f, "\tprivate_key=\"%s\"\n", cred->private_key);
939 if (cred->private_key_passwd)
941 cred->private_key_passwd);
942 if (cred->imsi)
943 fprintf(f, "\timsi=\"%s\"\n", cred->imsi);
944 if (cred->milenage)
945 fprintf(f, "\tmilenage=\"%s\"\n", cred->milenage);
946 for (i = 0; i < cred->num_domain; i++)
947 fprintf(f, "\tdomain=\"%s\"\n", cred->domain[i]);
948 if (cred->domain_suffix_match)
950 cred->domain_suffix_match);
951 if (cred->roaming_consortium_len) {
953 for (i = 0; i < cred->roaming_consortium_len; i++)
954 fprintf(f, "%02x", cred->roaming_consortium[i]);
957 if (cred->eap_method) {
959 name = eap_get_name(cred->eap_method[0].vendor,
960 cred->eap_method[0].method);
964 if (cred->phase1)
965 fprintf(f, "\tphase1=\"%s\"\n", cred->phase1);
966 if (cred->phase2)
967 fprintf(f, "\tphase2=\"%s\"\n", cred->phase2);
968 if (cred->excluded_ssid) {
970 for (i = 0; i < cred->num_excluded_ssid; i++) {
971 struct excluded_ssid *e = &cred->excluded_ssid[i];
978 if (cred->roaming_partner) {
979 for (i = 0; i < cred->num_roaming_partner; i++) {
980 struct roaming_partner *p = &cred->roaming_partner[i];
986 if (cred->update_identifier)
987 fprintf(f, "\tupdate_identifier=%d\n", cred->update_identifier);
989 if (cred->provisioning_sp)
990 fprintf(f, "\tprovisioning_sp=\"%s\"\n", cred->provisioning_sp);
991 if (cred->sp_priority)
992 fprintf(f, "\tsp_priority=%d\n", cred->sp_priority);
994 if (cred->min_dl_bandwidth_home)
996 cred->min_dl_bandwidth_home);
997 if (cred->min_ul_bandwidth_home)
999 cred->min_ul_bandwidth_home);
1000 if (cred->min_dl_bandwidth_roaming)
1002 cred->min_dl_bandwidth_roaming);
1003 if (cred->min_ul_bandwidth_roaming)
1005 cred->min_ul_bandwidth_roaming);
1007 if (cred->max_bss_load)
1009 cred->max_bss_load);
1011 if (cred->ocsp)
1012 fprintf(f, "\tocsp=%d\n", cred->ocsp);
1014 if (cred->num_req_conn_capab) {
1015 for (i = 0; i < cred->num_req_conn_capab; i++) {
1019 cred->req_conn_capab_proto[i]);
1020 ports = cred->req_conn_capab_port[i];
1032 if (cred->required_roaming_consortium_len) {
1034 for (i = 0; i < cred->required_roaming_consortium_len; i++)
1036 cred->required_roaming_consortium[i]);
1040 if (cred->sim_num != DEFAULT_USER_SELECTED_SIM)
1041 fprintf(f, "\tsim_num=%d\n", cred->sim_num);
1504 struct wpa_cred *cred;
1529 for (cred = config->cred; cred; cred = cred->next) {
1530 if (cred->temporary)
1533 wpa_config_write_cred(f, cred);