Lines Matching refs:ssid
239 struct hostapd_ssid *ssid) in hostapd_config_read_wpa_psk() argument
305 pbkdf2_sha1(pos, ssid->ssid, ssid->ssid_len, in hostapd_config_read_wpa_psk()
317 psk->next = ssid->wpa_psk; in hostapd_config_read_wpa_psk()
318 ssid->wpa_psk = psk; in hostapd_config_read_wpa_psk()
327 static int hostapd_derive_psk(struct hostapd_ssid *ssid) in hostapd_derive_psk() argument
329 ssid->wpa_psk = os_zalloc(sizeof(struct hostapd_wpa_psk)); in hostapd_derive_psk()
330 if (ssid->wpa_psk == NULL) { in hostapd_derive_psk()
335 (u8 *) ssid->ssid, ssid->ssid_len); in hostapd_derive_psk()
337 (u8 *) ssid->wpa_passphrase, in hostapd_derive_psk()
338 os_strlen(ssid->wpa_passphrase)); in hostapd_derive_psk()
339 pbkdf2_sha1(ssid->wpa_passphrase, in hostapd_derive_psk()
340 ssid->ssid, ssid->ssid_len, in hostapd_derive_psk()
341 4096, ssid->wpa_psk->psk, PMK_LEN); in hostapd_derive_psk()
343 ssid->wpa_psk->psk, PMK_LEN); in hostapd_derive_psk()
350 struct hostapd_ssid *ssid = &conf->ssid; in hostapd_setup_wpa_psk() local
352 if (ssid->wpa_passphrase != NULL) { in hostapd_setup_wpa_psk()
353 if (ssid->wpa_psk != NULL) { in hostapd_setup_wpa_psk()
359 if (hostapd_derive_psk(ssid) < 0) in hostapd_setup_wpa_psk()
362 ssid->wpa_psk->group = 1; in hostapd_setup_wpa_psk()
365 return hostapd_config_read_wpa_psk(ssid->wpa_psk_file, &conf->ssid); in hostapd_setup_wpa_psk()
481 hostapd_config_clear_wpa_psk(&conf->ssid.wpa_psk); in hostapd_config_free_bss()
483 str_clear_free(conf->ssid.wpa_passphrase); in hostapd_config_free_bss()
484 os_free(conf->ssid.wpa_psk_file); in hostapd_config_free_bss()
485 hostapd_config_free_wep(&conf->ssid.wep); in hostapd_config_free_bss()
487 os_free(conf->ssid.vlan_tagged_interface); in hostapd_config_free_bss()
785 for (psk = conf->ssid.wpa_psk; psk != NULL; psk = psk->next) { in hostapd_get_psk()
819 if (bss->ssid.wep.keys_set) { in hostapd_config_check_bss()
840 bss->ssid.wpa_psk == NULL && bss->ssid.wpa_passphrase == NULL && in hostapd_config_check_bss()
841 bss->ssid.wpa_psk_file == NULL && in hostapd_config_check_bss()
886 bss->ssid.security_policy == SECURITY_STATIC_WEP) { in hostapd_config_check_bss()
906 bss->ssid.security_policy == SECURITY_STATIC_WEP) { in hostapd_config_check_bss()
931 bss->ssid.wep.keys_set && bss->wpa == 0) { in hostapd_config_check_bss()
1061 bss->ssid.security_policy = SECURITY_WPA; in hostapd_set_security_params()
1063 bss->ssid.security_policy = SECURITY_WPA_PSK; in hostapd_set_security_params()
1066 bss->ssid.security_policy = SECURITY_IEEE_802_1X; in hostapd_set_security_params()
1067 bss->ssid.wep.default_len = bss->default_wep_key_len; in hostapd_set_security_params()
1071 } else if (full_config && bss->ssid.wep.keys_set) { in hostapd_set_security_params()
1072 if (bss->ssid.wep.len[0] >= 13) in hostapd_set_security_params()
1082 } else if (bss->ssid.wep.keys_set) { in hostapd_set_security_params()
1084 if (bss->ssid.wep.len[0] >= 13) in hostapd_set_security_params()
1086 bss->ssid.security_policy = SECURITY_STATIC_WEP; in hostapd_set_security_params()
1093 bss->ssid.security_policy = SECURITY_OSEN; in hostapd_set_security_params()
1098 bss->ssid.security_policy = SECURITY_PLAINTEXT; in hostapd_set_security_params()