Lines Matching refs:config
110 struct eap_peer_config *config, in eap_config_allowed_method() argument
116 if (config == NULL || config->eap_methods == NULL) in eap_config_allowed_method()
119 m = config->eap_methods; in eap_config_allowed_method()
177 struct eap_method_type * eap_get_phase2_types(struct eap_peer_config *config, in eap_get_phase2_types() argument
199 method == EAP_TYPE_TLS && config && in eap_get_phase2_types()
200 config->private_key2 == NULL) in eap_get_phase2_types()
352 struct eap_peer_config *config = eap_get_config(sm); in eap_sm_buildIdentity() local
357 if (config == NULL) { in eap_sm_buildIdentity()
368 } else if (!encrypted && config->anonymous_identity) { in eap_sm_buildIdentity()
369 identity = config->anonymous_identity; in eap_sm_buildIdentity()
370 identity_len = config->anonymous_identity_len; in eap_sm_buildIdentity()
374 identity = config->identity; in eap_sm_buildIdentity()
375 identity_len = config->identity_len; in eap_sm_buildIdentity()
383 if (config->pcsc) { in eap_sm_buildIdentity()
384 if (eap_sm_get_scard_identity(sm, config) < 0) in eap_sm_buildIdentity()
386 identity = config->identity; in eap_sm_buildIdentity()
387 identity_len = config->identity_len; in eap_sm_buildIdentity()
394 } else if (config->pcsc) { in eap_sm_buildIdentity()
395 if (eap_sm_set_scard_pin(sm, config) < 0) in eap_sm_buildIdentity()
415 struct eap_peer_config *config = eap_get_config(sm); in eap_sm_build_identity_resp() local
417 if (config == NULL) { in eap_sm_build_identity_resp()
426 } else if (!encrypted && config->anonymous_identity) { in eap_sm_build_identity_resp()
427 identity = config->anonymous_identity; in eap_sm_build_identity_resp()
428 identity_len = config->anonymous_identity_len; in eap_sm_build_identity_resp()
430 identity = config->identity; in eap_sm_build_identity_resp()
431 identity_len = config->identity_len; in eap_sm_build_identity_resp()
484 struct eap_peer_config *config = eap_get_config(sm); in eap_sm_build_nak() local
485 if (config == NULL || config->private_key == 0 || config->client_cert == 0) in eap_sm_build_nak()
517 sm->config.anonymous_identity = NULL; in eap_peer_config_init()
518 sm->config.identity = NULL; in eap_peer_config_init()
519 sm->config.password = NULL; in eap_peer_config_init()
520 sm->config.new_password = NULL; in eap_peer_config_init()
522 sm->config.private_key_passwd = private_key_passwd; in eap_peer_config_init()
523 sm->config.client_cert = (u8 *)sm->blob[0].name; in eap_peer_config_init()
524 sm->config.private_key = (u8 *)sm->blob[1].name; in eap_peer_config_init()
525 sm->config.ca_cert = (u8 *)sm->blob[2].name; in eap_peer_config_init()
526 sm->config.ca_path = NULL; in eap_peer_config_init()
528 sm->config.fragment_size = 1400; /* fragment size */ in eap_peer_config_init()
530 sm->config.pac_file = (char *) "blob://"; in eap_peer_config_init()
534 sm->config.anonymous_identity_len = g_wpa_anonymous_identity_len; in eap_peer_config_init()
535 sm->config.anonymous_identity = (u8 *)os_zalloc(sm->config.anonymous_identity_len); in eap_peer_config_init()
536 if (sm->config.anonymous_identity == NULL) in eap_peer_config_init()
538 … os_memcpy(sm->config.anonymous_identity, g_wpa_anonymous_identity, g_wpa_anonymous_identity_len); in eap_peer_config_init()
543 sm->config.identity_len = g_wpa_username_len; in eap_peer_config_init()
544 sm->config.identity = (u8 *)os_zalloc(sm->config.identity_len); in eap_peer_config_init()
545 if (sm->config.identity == NULL) { in eap_peer_config_init()
548 os_memcpy(sm->config.identity, g_wpa_username, g_wpa_username_len); in eap_peer_config_init()
552 sm->config.password_len = g_wpa_password_len; in eap_peer_config_init()
553 sm->config.password = (u8 *)os_zalloc(sm->config.password_len); in eap_peer_config_init()
554 if (sm->config.password == NULL) in eap_peer_config_init()
556 os_memcpy(sm->config.password, g_wpa_password, sm->config.password_len); in eap_peer_config_init()
560 sm->config.new_password_len = g_wpa_new_password_len; in eap_peer_config_init()
561 sm->config.new_password = (u8 *)os_zalloc(sm->config.new_password_len); in eap_peer_config_init()
562 if (sm->config.new_password == NULL) in eap_peer_config_init()
564 os_memcpy(sm->config.new_password, g_wpa_new_password, in eap_peer_config_init()
565 sm->config.new_password_len); in eap_peer_config_init()
569 sm->config.phase2 = g_wpa_ttls_phase2_type; in eap_peer_config_init()
572 sm->config.phase2 = "auth=MSCHAPV2"; in eap_peer_config_init()
576 sm->config.flags |= TLS_CONN_SUITEB; in eap_peer_config_init()
581 sm->config.flags |= TLS_CONN_USE_DEFAULT_CERT_BUNDLE; in eap_peer_config_init()
586 sm->config.phase1 = g_wpa_phase1_options; in eap_peer_config_init()
632 sm->config.eap_methods = config_methods; in eap_peer_config_init()
643 os_free(sm->config.anonymous_identity); in eap_peer_config_deinit()
644 os_free(sm->config.identity); in eap_peer_config_deinit()
645 os_free(sm->config.password); in eap_peer_config_deinit()
646 os_free(sm->config.new_password); in eap_peer_config_deinit()
647 os_free(sm->config.eap_methods); in eap_peer_config_deinit()
648 os_bzero(&sm->config, sizeof(struct eap_peer_config)); in eap_peer_config_deinit()
720 struct eap_peer_config *config; in eap_sm_request() local
724 config = eap_get_config(sm); in eap_sm_request()
725 if (config == NULL) in eap_sm_request()
730 config->pending_req_identity++; in eap_sm_request()
733 config->pending_req_password++; in eap_sm_request()
736 config->pending_req_new_password++; in eap_sm_request()
739 config->pending_req_pin++; in eap_sm_request()
742 config->pending_req_passphrase++; in eap_sm_request()
817 sm->config.client_cert = NULL; in eap_peer_blob_deinit()
818 sm->config.private_key = NULL; in eap_peer_blob_deinit()
819 sm->config.ca_cert = NULL; in eap_peer_blob_deinit()
820 sm->config.pac_file = NULL; in eap_peer_blob_deinit()
841 return &sm->config; in eap_get_config()
853 struct eap_peer_config *config = eap_get_config(sm); in eap_get_config_identity() local
854 if (config == NULL) in eap_get_config_identity()
856 *len = config->identity_len; in eap_get_config_identity()
857 return config->identity; in eap_get_config_identity()
869 struct eap_peer_config *config = eap_get_config(sm); in eap_get_config_password() local
870 if (config == NULL) in eap_get_config_password()
872 *len = config->password_len; in eap_get_config_password()
873 return config->password; in eap_get_config_password()
888 struct eap_peer_config *config = eap_get_config(sm); in eap_get_config_password2() local
889 if (config == NULL) in eap_get_config_password2()
892 *len = config->password_len; in eap_get_config_password2()
894 *hash = !!(config->flags & EAP_CONFIG_FLAGS_PASSWORD_NTHASH); in eap_get_config_password2()
895 return config->password; in eap_get_config_password2()
907 struct eap_peer_config *config = eap_get_config(sm); in eap_get_config_new_password() local
908 if (config == NULL) in eap_get_config_new_password()
910 *len = config->new_password_len; in eap_get_config_new_password()
911 return config->new_password; in eap_get_config_new_password()