X-Git-Url: http://git.ipfire.org/?p=ipfire-2.x.git;a=blobdiff_plain;f=html%2Fcgi-bin%2Fwirelessclient.cgi;h=6978663cf39d4d7aaa9c7eea8634ccfc435162e7;hp=a2d0273df502810e1636d5e9813b849998551f95;hb=5fbd7b29829caf0bcadcccd6f56ead51e2fb812e;hpb=943a96faed4fb515259c18d04b330ba622490b7b diff --git a/html/cgi-bin/wirelessclient.cgi b/html/cgi-bin/wirelessclient.cgi index a2d0273df5..6978663cf3 100644 --- a/html/cgi-bin/wirelessclient.cgi +++ b/html/cgi-bin/wirelessclient.cgi @@ -19,8 +19,8 @@ # # ############################################################################### -# DEVICE,ENABLED,MODE,WPA_MODE,SSID,PSK,PRIO -# wlan0,on,WPA2,,Use This One Mum,ThisIsTheKey,2 +# DEVICE,ENABLED,MODE,WPA_MODE,SSID,PSK,PRIO,AUTH,ANONYMOUS,IDENTITY,PASSWORD +# wlan0,on,WPA2,,Use This One Mum,ThisIsTheKey,2,TTLS,anonymous,username,password use strict; @@ -132,6 +132,10 @@ if ($settings{'ACTION'} eq $Lang::tr{'add'}) { push(@config, $settings{'SSID'}); push(@config, $settings{'PSK'}); push(@config, $settings{'PRIO'}); + push(@config, $settings{'AUTH'}); + push(@config, $settings{'ANONYMOUS'}); + push(@config, $settings{'IDENTITY'}); + push(@config, $settings{'PASSWORD'}); # Add the new configuration and write all the stuff to the configuration file. my $line = join(',', @config) . "\n"; @@ -164,6 +168,10 @@ if ($settings{'ACTION'} eq $Lang::tr{'edit'}) { $settings{'SSID'} = $config[5]; $settings{'PSK'} = $config[6]; $settings{'PRIO'} = $config[7]; + $settings{'AUTH'} = $config[8]; + $settings{'ANONYMOUS'} = $config[9]; + $settings{'IDENTITY'} = $config[10]; + $settings{'PASSWORD'} = $config[11]; } } } @@ -181,12 +189,16 @@ if ($settings{'ACTION'} eq $Lang::tr{'update'}) { if ($config[0] eq $settings{'ID'}) { # Update all configuration settings. # ID and INTERFACE cannot be changed. - $config[2] = $settings{'ENABLED'}; - $config[3] = $settings{'ENCRYPTION'}; - $config[4] = $settings{'WPA_MODE'}; - $config[5] = $settings{'SSID'}; - $config[6] = $settings{'PSK'}; - $config[7] = $settings{'PRIO'}; + $config[2] = $settings{'ENABLED'}; + $config[3] = $settings{'ENCRYPTION'}; + $config[4] = $settings{'WPA_MODE'}; + $config[5] = $settings{'SSID'}; + $config[6] = $settings{'PSK'}; + $config[7] = $settings{'PRIO'}; + $config[8] = $settings{'AUTH'}; + $config[9] = $settings{'ANONYMOUS'}; + $config[10] = $settings{'IDENTITY'}; + $config[11] = $settings{'PASSWORD'}; $line = join(',', @config); } @@ -312,9 +324,34 @@ END $encryption_mode = $Lang::tr{'wlan client encryption wpa'}; } elsif ($config[3] eq "WPA2") { $encryption_mode = $Lang::tr{'wlan client encryption wpa2'}; + } elsif ($config[3] eq "EAP") { + $encryption_mode = $Lang::tr{'wlan client encryption eap'}; } - if (($config[3] eq "WPA") || ($config[3] eq "WPA2")) { + if ($config[3] eq "EAP") { + if ($config[8] eq "PEAP") { + $encryption_mode .= " ($Lang::tr{'wlan client auth peap'})"; + } elsif ($config[8] eq "TTLS") { + $encryption_mode .= " ($Lang::tr{'wlan client auth ttls'})"; + } else { + $encryption_mode .= " ($Lang::tr{'wlan client auth auto'})"; + } + + $encryption_mode .= "
"; + + if ($config[10]) { + $encryption_mode .= "$Lang::tr{'wlan client identity'}: "; + $encryption_mode .= $config[10]; + } + + # Anonymous identity + if ($config[9]) { + $encryption_mode .= "
"; + $encryption_mode .= "$Lang::tr{'wlan client anonymous identity'}: "; + $encryption_mode .= $config[9]; + } + + } elsif (($config[3] eq "WPA") || ($config[3] eq "WPA2")) { my $wpa_pairwise = "$Lang::tr{'wlan client ccmp'} $Lang::tr{'wlan client and'} $Lang::tr{'wlan client tkip'}"; my $wpa_group = "$Lang::tr{'wlan client ccmp'} $Lang::tr{'wlan client and'} $Lang::tr{'wlan client tkip'}"; @@ -437,6 +474,12 @@ sub showEditBox() { $selected{'WPA_MODE'}{'TKIP-TKIP'} = ''; $selected{'WPA_MODE'}{$settings{'WPA_MODE'}} = "selected='selected'"; + $selected{'AUTH'} = (); + $selected{'AUTH'}{''} = ''; + $selected{'AUTH'}{'PEAP'} = ''; + $selected{'AUTH'}{'TTLS'} = ''; + $selected{'AUTH'}{$settings{'AUTH'}} = "selected='selected'"; + $selected{'PRIO'} = (); $selected{'PRIO'}{'0'} = ''; $selected{'PRIO'}{'1'} = ''; @@ -461,6 +504,7 @@ sub showEditBox() { + + + + + + + + + + $Lang::tr{'wlan client anonymous identity'}: + + + + + + + + + $Lang::tr{'wlan client identity'}: + + + + + + + + + $Lang::tr{'wlan client password'}: + + + + + + + + +
+
+ $Lang::tr{'wlan client advanced settings'}: @@ -585,6 +680,59 @@ sub ShowStatus() { END + if ($status{'EAP state'}) { + my $selected_method = $status{'selectedMethod'}; + $selected_method =~ s/\d+ \((.*)\)/$1/e; + + print < + + $Lang::tr{'wlan client encryption eap'} + + + + + $Lang::tr{'wlan client eap state'} + + + $status{'EAP state'} + + + + + $Lang::tr{'wlan client method'} + + + $selected_method + + + + + $Lang::tr{'wlan client tls version'} + + + $status{'eap_tls_version'} + + + + + $Lang::tr{'wlan client tls cipher'} + + + $status{'EAP TLS cipher'} + + + + + $Lang::tr{'wlan client eap phase2 method'} + + + $status{"${selected_method}v0 Phase2 method"} + + +END + } + if (($status{'pairwise_cipher'} ne "NONE") || ($status{'group_cipher'} ne "NONE")) { print <