|
|
@ -41,48 +41,52 @@
|
|
|
|
#include <kpassdlg.h>
|
|
|
|
#include <kpassdlg.h>
|
|
|
|
|
|
|
|
|
|
|
|
/* knetworkmanager headers */
|
|
|
|
/* knetworkmanager headers */
|
|
|
|
#include "knetworkmanager-accesspoint.h"
|
|
|
|
|
|
|
|
#include "knetworkmanager-wireless_device.h"
|
|
|
|
|
|
|
|
#include "knetworkmanager-device.h"
|
|
|
|
|
|
|
|
#include "knetworkmanager-connection.h"
|
|
|
|
|
|
|
|
#include "knetworkmanager-connection_setting_wireless_security_widget.h"
|
|
|
|
#include "knetworkmanager-connection_setting_wireless_security_widget.h"
|
|
|
|
#include "knetworkmanager-connection_setting_wireless_security.h"
|
|
|
|
|
|
|
|
#include "knetworkmanager-connection_setting_wireless.h"
|
|
|
|
|
|
|
|
#include "knetworkmanager-connection_setting_8021x.h"
|
|
|
|
|
|
|
|
#include "sha1.h"
|
|
|
|
#include "sha1.h"
|
|
|
|
#include "md5.h"
|
|
|
|
#include "md5.h"
|
|
|
|
#include "knetworkmanager-wireless_manager.h"
|
|
|
|
#include "knetworkmanager-wireless_manager.h"
|
|
|
|
|
|
|
|
|
|
|
|
#define WPA_PMK_LEN 32
|
|
|
|
#define WPA_PMK_LEN 32
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define SET_FLAG_IF_TRUE_CLEAR_IF_FALSE(x,y,z) { \
|
|
|
|
|
|
|
|
if (z) { \
|
|
|
|
|
|
|
|
x |= y; \
|
|
|
|
|
|
|
|
} \
|
|
|
|
|
|
|
|
else { \
|
|
|
|
|
|
|
|
x &= (~y); \
|
|
|
|
|
|
|
|
} \
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
using namespace ConnectionSettings;
|
|
|
|
using namespace ConnectionSettings;
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
class WirelessSecurityWEPImpl
|
|
|
|
class WirelessSecurityWEPImpl
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
WirelessSecurityWEPImpl::WirelessSecurityWEPImpl(WirelessSecurity* sec, TQWidget* parent, const char* name, WFlags fl)
|
|
|
|
WirelessSecurityWEPImpl::WirelessSecurityWEPImpl(TDEWiFiConnection* sec, TQWidget* parent, const char* name, WFlags fl)
|
|
|
|
: ConnectionSettingWirelessSecurityWEP(parent, name, fl)
|
|
|
|
: ConnectionSettingWirelessSecurityWEP(parent, name, fl)
|
|
|
|
, _security_setting(sec)
|
|
|
|
, _security_setting(sec)
|
|
|
|
, _wepKeyType( WEPKEY_TYPE_HEX )
|
|
|
|
, _wepKeyType( WEPKEY_TYPE_HEX )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
cboAuthentication->insertItem(i18n("Open System"), 0);
|
|
|
|
cboAuthentication->insertItem(i18n("Open System"), 0);
|
|
|
|
cboAuthentication->insertItem(i18n("Shared Key"), 1);
|
|
|
|
cboAuthentication->insertItem(i18n("Shared Key"), 1);
|
|
|
|
if (_security_setting->getAuthAlg() == WirelessSecurity::AUTH_ALG_OPEN)
|
|
|
|
if (_security_setting->securitySettings.authType == TDENetworkWiFiAuthType::Open) {
|
|
|
|
cboAuthentication->setCurrentItem(0);
|
|
|
|
cboAuthentication->setCurrentItem(0);
|
|
|
|
else if (_security_setting->getAuthAlg() == WirelessSecurity::AUTH_ALG_SHARED)
|
|
|
|
}
|
|
|
|
|
|
|
|
else if (_security_setting->securitySettings.authType == TDENetworkWiFiAuthType::Shared) {
|
|
|
|
cboAuthentication->setCurrentItem(1);
|
|
|
|
cboAuthentication->setCurrentItem(1);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
cbKeyType->insertItem(i18n("WEP 40/128-bit ASCII"), WEPKEY_TYPE_ASCII);
|
|
|
|
cbKeyType->insertItem(i18n("WEP 40/128-bit ASCII"), WEPKEY_TYPE_ASCII);
|
|
|
|
cbKeyType->insertItem(i18n("WEP 40/128-bit Hexadecimal"), WEPKEY_TYPE_HEX);
|
|
|
|
cbKeyType->insertItem(i18n("WEP 40/128-bit Hexadecimal"), WEPKEY_TYPE_HEX);
|
|
|
|
cbKeyType->insertItem(i18n("WEP 128-bit passphrase"), WEPKEY_TYPE_PASSPHRASE);
|
|
|
|
cbKeyType->insertItem(i18n("WEP 128-bit passphrase"), WEPKEY_TYPE_PASSPHRASE);
|
|
|
|
cbKeyType->setCurrentItem(_wepKeyType );
|
|
|
|
cbKeyType->setCurrentItem(_wepKeyType );
|
|
|
|
|
|
|
|
|
|
|
|
txtWEPKey0->setText(_security_setting->getWepKey(0));
|
|
|
|
txtWEPKey0->setText(_security_setting->securitySettings.wepKey0);
|
|
|
|
txtWEPKey1->setText(_security_setting->getWepKey(1));
|
|
|
|
txtWEPKey1->setText(_security_setting->securitySettings.wepKey1);
|
|
|
|
txtWEPKey2->setText(_security_setting->getWepKey(2));
|
|
|
|
txtWEPKey2->setText(_security_setting->securitySettings.wepKey2);
|
|
|
|
txtWEPKey3->setText(_security_setting->getWepKey(3));
|
|
|
|
txtWEPKey3->setText(_security_setting->securitySettings.wepKey3);
|
|
|
|
|
|
|
|
|
|
|
|
switch(_security_setting->getWepTxidx())
|
|
|
|
switch(_security_setting->securitySettings.wepKeyIndex)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
case 0:
|
|
|
|
case 0:
|
|
|
|
rbKeyIdx0->setChecked(true);
|
|
|
|
rbKeyIdx0->setChecked(true);
|
|
|
@ -116,10 +120,12 @@ WirelessSecurityWEPImpl::WirelessSecurityWEPImpl(WirelessSecurity* sec, TQWidget
|
|
|
|
|
|
|
|
|
|
|
|
void WirelessSecurityWEPImpl::slotAuthAlgChanged(int index)
|
|
|
|
void WirelessSecurityWEPImpl::slotAuthAlgChanged(int index)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (index == 0)
|
|
|
|
if (index == 0) {
|
|
|
|
_security_setting->setAuthAlg(WirelessSecurity::AUTH_ALG_OPEN);
|
|
|
|
_security_setting->securitySettings.authType =TDENetworkWiFiAuthType::Open;
|
|
|
|
else if (index == 1)
|
|
|
|
}
|
|
|
|
_security_setting->setAuthAlg(WirelessSecurity::AUTH_ALG_SHARED);
|
|
|
|
else if (index == 1) {
|
|
|
|
|
|
|
|
_security_setting->securitySettings.authType = TDENetworkWiFiAuthType::Shared;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void WirelessSecurityWEPImpl::slotKeyTypeChanged(int index)
|
|
|
|
void WirelessSecurityWEPImpl::slotKeyTypeChanged(int index)
|
|
|
@ -132,49 +138,53 @@ void WirelessSecurityWEPImpl::slotKeyTypeChanged(int index)
|
|
|
|
void WirelessSecurityWEPImpl::slotWepKey0Changed(const TQString &key)
|
|
|
|
void WirelessSecurityWEPImpl::slotWepKey0Changed(const TQString &key)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
TQCString hashed = getHashedWEPKey(key, _wepKeyType);
|
|
|
|
TQCString hashed = getHashedWEPKey(key, _wepKeyType);
|
|
|
|
_security_setting->setWepKey(0, hashed);
|
|
|
|
_security_setting->securitySettings.wepKey0 = hashed;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void WirelessSecurityWEPImpl::slotWepKey1Changed(const TQString &key)
|
|
|
|
void WirelessSecurityWEPImpl::slotWepKey1Changed(const TQString &key)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
TQCString hashed = getHashedWEPKey(key, _wepKeyType);
|
|
|
|
TQCString hashed = getHashedWEPKey(key, _wepKeyType);
|
|
|
|
_security_setting->setWepKey(1, hashed);
|
|
|
|
_security_setting->securitySettings.wepKey1 = hashed;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void WirelessSecurityWEPImpl::slotWepKey2Changed(const TQString &key)
|
|
|
|
void WirelessSecurityWEPImpl::slotWepKey2Changed(const TQString &key)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
TQCString hashed = getHashedWEPKey(key, _wepKeyType);
|
|
|
|
TQCString hashed = getHashedWEPKey(key, _wepKeyType);
|
|
|
|
_security_setting->setWepKey(2, hashed);
|
|
|
|
_security_setting->securitySettings.wepKey2 = hashed;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void WirelessSecurityWEPImpl::slotWepKey3Changed(const TQString& key)
|
|
|
|
void WirelessSecurityWEPImpl::slotWepKey3Changed(const TQString& key)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
TQCString hashed = getHashedWEPKey(key, _wepKeyType);
|
|
|
|
TQCString hashed = getHashedWEPKey(key, _wepKeyType);
|
|
|
|
_security_setting->setWepKey(3, hashed);
|
|
|
|
_security_setting->securitySettings.wepKey3 = hashed;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void WirelessSecurityWEPImpl::slotWepIdx0Checked(bool check)
|
|
|
|
void WirelessSecurityWEPImpl::slotWepIdx0Checked(bool check)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (check)
|
|
|
|
if (check) {
|
|
|
|
_security_setting->setWepTxidx(0);
|
|
|
|
_security_setting->securitySettings.wepKeyIndex = 0;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void WirelessSecurityWEPImpl::slotWepIdx1Checked(bool check)
|
|
|
|
void WirelessSecurityWEPImpl::slotWepIdx1Checked(bool check)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (check)
|
|
|
|
if (check) {
|
|
|
|
_security_setting->setWepTxidx(1);
|
|
|
|
_security_setting->securitySettings.wepKeyIndex = 1;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void WirelessSecurityWEPImpl::slotWepIdx2Checked(bool check)
|
|
|
|
void WirelessSecurityWEPImpl::slotWepIdx2Checked(bool check)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (check)
|
|
|
|
if (check) {
|
|
|
|
_security_setting->setWepTxidx(2);
|
|
|
|
_security_setting->securitySettings.wepKeyIndex = 2;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void WirelessSecurityWEPImpl::slotWepIdx3Checked(bool check)
|
|
|
|
void WirelessSecurityWEPImpl::slotWepIdx3Checked(bool check)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (check)
|
|
|
|
if (check) {
|
|
|
|
_security_setting->setWepTxidx(3);
|
|
|
|
_security_setting->securitySettings.wepKeyIndex = 3;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
TQCString
|
|
|
|
TQCString
|
|
|
@ -243,7 +253,7 @@ WirelessSecurityWEPImpl::String2Hex(TQByteArray bytes, int final_len) const
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
class WirelessSecurityWEPEncryptionImpl
|
|
|
|
class WirelessSecurityWEPEncryptionImpl
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
WirelessSecurityWEPEncryptionImpl::WirelessSecurityWEPEncryptionImpl(WirelessSecurity* security_setting, TQWidget* parent, const char* name, WFlags fl)
|
|
|
|
WirelessSecurityWEPEncryptionImpl::WirelessSecurityWEPEncryptionImpl(TDEWiFiConnection* security_setting, TQWidget* parent, const char* name, WFlags fl)
|
|
|
|
: ConnectionSettingWirelessSecurityWEPEncryption(parent, name, fl)
|
|
|
|
: ConnectionSettingWirelessSecurityWEPEncryption(parent, name, fl)
|
|
|
|
, _security_setting(security_setting)
|
|
|
|
, _security_setting(security_setting)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -255,12 +265,12 @@ WirelessSecurityWEPEncryptionImpl::WirelessSecurityWEPEncryptionImpl(WirelessSec
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
class WirelessSecurityWPAVersionImpl
|
|
|
|
class WirelessSecurityWPAVersionImpl
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
WirelessSecurityWPAVersionImpl::WirelessSecurityWPAVersionImpl(WirelessSecurity* security_setting, TQWidget* parent, const char* name, WFlags fl)
|
|
|
|
WirelessSecurityWPAVersionImpl::WirelessSecurityWPAVersionImpl(TDEWiFiConnection* security_setting, TQWidget* parent, const char* name, WFlags fl)
|
|
|
|
: ConnectionSettingWirelessSecurityWPAVersion(parent, name, fl)
|
|
|
|
: ConnectionSettingWirelessSecurityWPAVersion(parent, name, fl)
|
|
|
|
, _security_setting(security_setting)
|
|
|
|
, _security_setting(security_setting)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
cbWPA->setChecked(_security_setting->getProto() & WirelessSecurity::PROTO_WPA);
|
|
|
|
cbWPA->setChecked(_security_setting->securitySettings.wpaVersion & TDENetworkWiFiWPAVersionFlags::WPA);
|
|
|
|
cbRSN->setChecked(_security_setting->getProto() & WirelessSecurity::PROTO_RSN);
|
|
|
|
cbRSN->setChecked(_security_setting->securitySettings.wpaVersion & TDENetworkWiFiWPAVersionFlags::RSN);
|
|
|
|
|
|
|
|
|
|
|
|
connect(cbWPA, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotWPA1(bool)));
|
|
|
|
connect(cbWPA, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotWPA1(bool)));
|
|
|
|
connect(cbRSN, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotWPA2(bool)));
|
|
|
|
connect(cbRSN, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotWPA2(bool)));
|
|
|
@ -271,45 +281,39 @@ WirelessSecurityWPAVersionImpl::WirelessSecurityWPAVersionImpl(WirelessSecurity*
|
|
|
|
void
|
|
|
|
void
|
|
|
|
WirelessSecurityWPAVersionImpl::slotAuto(bool on)
|
|
|
|
WirelessSecurityWPAVersionImpl::slotAuto(bool on)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (!on)
|
|
|
|
if (!on) {
|
|
|
|
{
|
|
|
|
|
|
|
|
// auto-select proto
|
|
|
|
// auto-select proto
|
|
|
|
_security_setting->setProto(WirelessSecurity::PROTO_AUTO);
|
|
|
|
_security_setting->securitySettings.wpaVersion = TDENetworkWiFiWPAVersionFlags::Any;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else {
|
|
|
|
{
|
|
|
|
|
|
|
|
// use selected wpa-version
|
|
|
|
// use selected wpa-version
|
|
|
|
TQ_UINT32 proto = WirelessSecurity::PROTO_NONE;
|
|
|
|
TDENetworkWiFiWPAVersionFlags::TDENetworkWiFiWPAVersionFlags proto = TDENetworkWiFiWPAVersionFlags::None;
|
|
|
|
if (cbWPA->isChecked())
|
|
|
|
if (cbWPA->isChecked()) {
|
|
|
|
proto |= WirelessSecurity::PROTO_WPA;
|
|
|
|
proto |= TDENetworkWiFiWPAVersionFlags::WPA;
|
|
|
|
if (cbRSN->isChecked())
|
|
|
|
}
|
|
|
|
proto |= WirelessSecurity::PROTO_RSN;
|
|
|
|
if (cbRSN->isChecked()) {
|
|
|
|
_security_setting->setProto(proto);
|
|
|
|
proto |= TDENetworkWiFiWPAVersionFlags::RSN;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
_security_setting->securitySettings.wpaVersion = proto;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
void
|
|
|
|
WirelessSecurityWPAVersionImpl::slotWPA1(bool on)
|
|
|
|
WirelessSecurityWPAVersionImpl::slotWPA1(bool on)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (on)
|
|
|
|
SET_FLAG_IF_TRUE_CLEAR_IF_FALSE(_security_setting->securitySettings.wpaVersion, TDENetworkWiFiWPAVersionFlags::WPA, on);
|
|
|
|
_security_setting->addProto(WirelessSecurity::PROTO_WPA);
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
_security_setting->delProto(WirelessSecurity::PROTO_WPA);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
void
|
|
|
|
WirelessSecurityWPAVersionImpl::slotWPA2(bool on)
|
|
|
|
WirelessSecurityWPAVersionImpl::slotWPA2(bool on)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (on)
|
|
|
|
SET_FLAG_IF_TRUE_CLEAR_IF_FALSE(_security_setting->securitySettings.wpaVersion, TDENetworkWiFiWPAVersionFlags::RSN, on);
|
|
|
|
_security_setting->addProto(WirelessSecurity::PROTO_RSN);
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
_security_setting->delProto(WirelessSecurity::PROTO_RSN);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
class WirelessSecurityWPACipherImpl
|
|
|
|
class WirelessSecurityWPACipherImpl
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
WirelessSecurityWPACipherImpl::WirelessSecurityWPACipherImpl(WirelessSecurity* security_setting, TQWidget* parent, const char* name, WFlags fl)
|
|
|
|
WirelessSecurityWPACipherImpl::WirelessSecurityWPACipherImpl(TDEWiFiConnection* security_setting, TQWidget* parent, const char* name, WFlags fl)
|
|
|
|
: ConnectionSettingWirelessSecurityWPACipher(parent, name, fl)
|
|
|
|
: ConnectionSettingWirelessSecurityWPACipher(parent, name, fl)
|
|
|
|
, _security_setting(security_setting)
|
|
|
|
, _security_setting(security_setting)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -323,13 +327,13 @@ WirelessSecurityWPACipherImpl::WirelessSecurityWPACipherImpl(WirelessSecurity* s
|
|
|
|
connect(chkPairwiseCipherTKIP, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotPairwiseCipherChangedTKIP(bool)));
|
|
|
|
connect(chkPairwiseCipherTKIP, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotPairwiseCipherChangedTKIP(bool)));
|
|
|
|
connect(chkPairwiseCipherCCMP, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotPairwiseCipherChangedCCMP(bool)));
|
|
|
|
connect(chkPairwiseCipherCCMP, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotPairwiseCipherChangedCCMP(bool)));
|
|
|
|
|
|
|
|
|
|
|
|
chkPairwiseCipherCCMP->setChecked(_security_setting->getPairwiseCiphers() & WirelessSecurity::CIPHER_CCMP);
|
|
|
|
chkPairwiseCipherCCMP->setChecked(_security_setting->securitySettings.allowedPairWiseCiphers.contains(TDENetworkWiFiConnectionCipher::Any) || _security_setting->securitySettings.allowedPairWiseCiphers.contains(TDENetworkWiFiConnectionCipher::CipherCCMP));
|
|
|
|
chkPairwiseCipherTKIP->setChecked(_security_setting->getPairwiseCiphers() & WirelessSecurity::CIPHER_TKIP);
|
|
|
|
chkPairwiseCipherTKIP->setChecked(_security_setting->securitySettings.allowedPairWiseCiphers.contains(TDENetworkWiFiConnectionCipher::Any) || _security_setting->securitySettings.allowedPairWiseCiphers.contains(TDENetworkWiFiConnectionCipher::CipherTKIP));
|
|
|
|
|
|
|
|
|
|
|
|
chkGroupCipherCCMP->setChecked(_security_setting->getGroupCiphers() & WirelessSecurity::CIPHER_CCMP);
|
|
|
|
chkGroupCipherCCMP->setChecked(_security_setting->securitySettings.allowedGroupWiseCiphers.contains(TDENetworkWiFiConnectionCipher::Any) || _security_setting->securitySettings.allowedGroupWiseCiphers.contains(TDENetworkWiFiConnectionCipher::CipherCCMP));
|
|
|
|
chkGroupCipherTKIP->setChecked(_security_setting->getGroupCiphers() & WirelessSecurity::CIPHER_TKIP);
|
|
|
|
chkGroupCipherTKIP->setChecked(_security_setting->securitySettings.allowedGroupWiseCiphers.contains(TDENetworkWiFiConnectionCipher::Any) || _security_setting->securitySettings.allowedGroupWiseCiphers.contains(TDENetworkWiFiConnectionCipher::CipherTKIP));
|
|
|
|
chkGroupCipherWEP40->setChecked(_security_setting->getGroupCiphers() & WirelessSecurity::CIPHER_WEP40);
|
|
|
|
chkGroupCipherWEP40->setChecked(_security_setting->securitySettings.allowedGroupWiseCiphers.contains(TDENetworkWiFiConnectionCipher::Any) || _security_setting->securitySettings.allowedGroupWiseCiphers.contains(TDENetworkWiFiConnectionCipher::CipherWEP40));
|
|
|
|
chkGroupCipherWEP104->setChecked(_security_setting->getGroupCiphers() & WirelessSecurity::CIPHER_WEP104);
|
|
|
|
chkGroupCipherWEP104->setChecked(_security_setting->securitySettings.allowedGroupWiseCiphers.contains(TDENetworkWiFiConnectionCipher::Any) || _security_setting->securitySettings.allowedGroupWiseCiphers.contains(TDENetworkWiFiConnectionCipher::CipherWEP104));
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -339,32 +343,40 @@ WirelessSecurityWPACipherImpl::slotCipherChangedAuto(bool checked)
|
|
|
|
if (!checked)
|
|
|
|
if (!checked)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// select auto for both ciphers
|
|
|
|
// select auto for both ciphers
|
|
|
|
_security_setting->setGroupCiphers(WirelessSecurity::CIPHER_AUTO);
|
|
|
|
_security_setting->securitySettings.allowedGroupWiseCiphers.clear();
|
|
|
|
_security_setting->setPairwiseCiphers(WirelessSecurity::CIPHER_AUTO);
|
|
|
|
_security_setting->securitySettings.allowedGroupWiseCiphers.append(TDENetworkWiFiConnectionCipher::Any);
|
|
|
|
|
|
|
|
_security_setting->securitySettings.allowedPairWiseCiphers.clear();
|
|
|
|
|
|
|
|
_security_setting->securitySettings.allowedPairWiseCiphers.append(TDENetworkWiFiConnectionCipher::Any);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// use the already selected ciphers
|
|
|
|
// use the already selected ciphers
|
|
|
|
|
|
|
|
|
|
|
|
// group cipher
|
|
|
|
// group cipher
|
|
|
|
TQ_UINT32 cipher = WirelessSecurity::CIPHER_NONE;
|
|
|
|
TDENetworkWiFiConnectionCipherList cipher;
|
|
|
|
if (chkGroupCipherTKIP->isChecked())
|
|
|
|
if (chkGroupCipherTKIP->isChecked()) {
|
|
|
|
cipher |= WirelessSecurity::CIPHER_TKIP;
|
|
|
|
cipher.append(TDENetworkWiFiConnectionCipher::CipherTKIP);
|
|
|
|
if (chkGroupCipherCCMP->isChecked())
|
|
|
|
}
|
|
|
|
cipher |= WirelessSecurity::CIPHER_CCMP;
|
|
|
|
if (chkGroupCipherCCMP->isChecked()) {
|
|
|
|
if (chkGroupCipherWEP40->isChecked())
|
|
|
|
cipher.append(TDENetworkWiFiConnectionCipher::CipherCCMP);
|
|
|
|
cipher |= WirelessSecurity::CIPHER_WEP40;
|
|
|
|
}
|
|
|
|
if (chkGroupCipherWEP104->isChecked())
|
|
|
|
if (chkGroupCipherWEP40->isChecked()) {
|
|
|
|
cipher |= WirelessSecurity::CIPHER_WEP104;
|
|
|
|
cipher.append(TDENetworkWiFiConnectionCipher::CipherWEP40);
|
|
|
|
_security_setting->setGroupCiphers(cipher);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (chkGroupCipherWEP104->isChecked()) {
|
|
|
|
|
|
|
|
cipher.append(TDENetworkWiFiConnectionCipher::CipherWEP104);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
_security_setting->securitySettings.allowedGroupWiseCiphers = cipher;
|
|
|
|
|
|
|
|
|
|
|
|
// pairwise cipher
|
|
|
|
// pairwise cipher
|
|
|
|
cipher = WirelessSecurity::CIPHER_NONE;
|
|
|
|
cipher.clear();
|
|
|
|
if (chkPairwiseCipherTKIP->isChecked())
|
|
|
|
if (chkPairwiseCipherTKIP->isChecked()) {
|
|
|
|
cipher |= WirelessSecurity::CIPHER_TKIP;
|
|
|
|
cipher.append(TDENetworkWiFiConnectionCipher::CipherTKIP);
|
|
|
|
if (chkPairwiseCipherCCMP->isChecked())
|
|
|
|
}
|
|
|
|
cipher |= WirelessSecurity::CIPHER_CCMP;
|
|
|
|
if (chkPairwiseCipherCCMP->isChecked()) {
|
|
|
|
_security_setting->setPairwiseCiphers(cipher);
|
|
|
|
cipher.append(TDENetworkWiFiConnectionCipher::CipherCCMP);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
_security_setting->securitySettings.allowedPairWiseCiphers = cipher;
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -372,66 +384,80 @@ WirelessSecurityWPACipherImpl::slotCipherChangedAuto(bool checked)
|
|
|
|
void
|
|
|
|
void
|
|
|
|
WirelessSecurityWPACipherImpl::slotGroupCipherChangedTKIP(bool checked)
|
|
|
|
WirelessSecurityWPACipherImpl::slotGroupCipherChangedTKIP(bool checked)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (checked)
|
|
|
|
if (checked) {
|
|
|
|
_security_setting->setGroupCiphers(_security_setting->getGroupCiphers() | WirelessSecurity::CIPHER_TKIP);
|
|
|
|
if (!_security_setting->securitySettings.allowedGroupWiseCiphers.contains(TDENetworkWiFiConnectionCipher::CipherTKIP)) _security_setting->securitySettings.allowedGroupWiseCiphers.append(TDENetworkWiFiConnectionCipher::CipherTKIP);
|
|
|
|
else
|
|
|
|
}
|
|
|
|
_security_setting->setGroupCiphers(_security_setting->getGroupCiphers() & (!WirelessSecurity::CIPHER_TKIP));
|
|
|
|
else {
|
|
|
|
|
|
|
|
_security_setting->securitySettings.allowedGroupWiseCiphers.remove(TDENetworkWiFiConnectionCipher::CipherTKIP);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
void
|
|
|
|
WirelessSecurityWPACipherImpl::slotGroupCipherChangedCCMP(bool checked)
|
|
|
|
WirelessSecurityWPACipherImpl::slotGroupCipherChangedCCMP(bool checked)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (checked)
|
|
|
|
if (checked) {
|
|
|
|
_security_setting->setGroupCiphers(_security_setting->getGroupCiphers() | WirelessSecurity::CIPHER_CCMP);
|
|
|
|
if (!_security_setting->securitySettings.allowedGroupWiseCiphers.contains(TDENetworkWiFiConnectionCipher::CipherCCMP)) _security_setting->securitySettings.allowedGroupWiseCiphers.append(TDENetworkWiFiConnectionCipher::CipherCCMP);
|
|
|
|
else
|
|
|
|
}
|
|
|
|
_security_setting->setGroupCiphers(_security_setting->getGroupCiphers() & (!WirelessSecurity::CIPHER_CCMP));
|
|
|
|
else {
|
|
|
|
|
|
|
|
_security_setting->securitySettings.allowedGroupWiseCiphers.remove(TDENetworkWiFiConnectionCipher::CipherCCMP);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
void
|
|
|
|
WirelessSecurityWPACipherImpl::slotGroupCipherChangedWEP40(bool checked)
|
|
|
|
WirelessSecurityWPACipherImpl::slotGroupCipherChangedWEP40(bool checked)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (checked)
|
|
|
|
if (checked) {
|
|
|
|
_security_setting->setGroupCiphers(_security_setting->getGroupCiphers() | WirelessSecurity::CIPHER_WEP40);
|
|
|
|
if (!_security_setting->securitySettings.allowedPairWiseCiphers.contains(TDENetworkWiFiConnectionCipher::CipherWEP40)) _security_setting->securitySettings.allowedPairWiseCiphers.append(TDENetworkWiFiConnectionCipher::CipherWEP40);
|
|
|
|
else
|
|
|
|
}
|
|
|
|
_security_setting->setGroupCiphers(_security_setting->getGroupCiphers() & (!WirelessSecurity::CIPHER_WEP40));
|
|
|
|
else {
|
|
|
|
|
|
|
|
_security_setting->securitySettings.allowedPairWiseCiphers.remove(TDENetworkWiFiConnectionCipher::CipherWEP40);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
void
|
|
|
|
WirelessSecurityWPACipherImpl::slotGroupCipherChangedWEP104(bool checked)
|
|
|
|
WirelessSecurityWPACipherImpl::slotGroupCipherChangedWEP104(bool checked)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (checked)
|
|
|
|
if (checked) {
|
|
|
|
_security_setting->setGroupCiphers(_security_setting->getGroupCiphers() | WirelessSecurity::CIPHER_WEP104);
|
|
|
|
if (!_security_setting->securitySettings.allowedPairWiseCiphers.contains(TDENetworkWiFiConnectionCipher::CipherWEP104)) _security_setting->securitySettings.allowedPairWiseCiphers.append(TDENetworkWiFiConnectionCipher::CipherWEP104);
|
|
|
|
else
|
|
|
|
}
|
|
|
|
_security_setting->setGroupCiphers(_security_setting->getGroupCiphers() & (!WirelessSecurity::CIPHER_WEP104));
|
|
|
|
else {
|
|
|
|
|
|
|
|
_security_setting->securitySettings.allowedPairWiseCiphers.remove(TDENetworkWiFiConnectionCipher::CipherWEP104);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
void
|
|
|
|
WirelessSecurityWPACipherImpl::slotPairwiseCipherChangedTKIP(bool checked)
|
|
|
|
WirelessSecurityWPACipherImpl::slotPairwiseCipherChangedTKIP(bool checked)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (checked)
|
|
|
|
if (checked) {
|
|
|
|
_security_setting->setPairwiseCiphers(_security_setting->getPairwiseCiphers() | WirelessSecurity::CIPHER_TKIP);
|
|
|
|
if (!_security_setting->securitySettings.allowedPairWiseCiphers.contains(TDENetworkWiFiConnectionCipher::CipherTKIP)) _security_setting->securitySettings.allowedPairWiseCiphers.append(TDENetworkWiFiConnectionCipher::CipherTKIP);
|
|
|
|
else
|
|
|
|
}
|
|
|
|
_security_setting->setPairwiseCiphers(_security_setting->getPairwiseCiphers() & (!WirelessSecurity::CIPHER_TKIP));
|
|
|
|
else {
|
|
|
|
|
|
|
|
_security_setting->securitySettings.allowedPairWiseCiphers.remove(TDENetworkWiFiConnectionCipher::CipherTKIP);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
void
|
|
|
|
WirelessSecurityWPACipherImpl::slotPairwiseCipherChangedCCMP(bool checked)
|
|
|
|
WirelessSecurityWPACipherImpl::slotPairwiseCipherChangedCCMP(bool checked)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (checked)
|
|
|
|
if (checked) {
|
|
|
|
_security_setting->setPairwiseCiphers(_security_setting->getPairwiseCiphers() | WirelessSecurity::CIPHER_CCMP);
|
|
|
|
if (!_security_setting->securitySettings.allowedPairWiseCiphers.contains(TDENetworkWiFiConnectionCipher::CipherCCMP)) _security_setting->securitySettings.allowedPairWiseCiphers.append(TDENetworkWiFiConnectionCipher::CipherCCMP);
|
|
|
|
else
|
|
|
|
}
|
|
|
|
_security_setting->setPairwiseCiphers(_security_setting->getPairwiseCiphers() & (!WirelessSecurity::CIPHER_CCMP));
|
|
|
|
else {
|
|
|
|
|
|
|
|
_security_setting->securitySettings.allowedPairWiseCiphers.remove(TDENetworkWiFiConnectionCipher::CipherCCMP);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
class WirelessSecurityWPAPSK
|
|
|
|
class WirelessSecurityWPAPSK
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
WirelessSecurityWPAPSKImpl::WirelessSecurityWPAPSKImpl(WirelessSecurity* security_setting, Wireless* wireless_setting, TQWidget* parent, const char* name, WFlags fl)
|
|
|
|
WirelessSecurityWPAPSKImpl::WirelessSecurityWPAPSKImpl(TDEWiFiConnection* security_setting, TDEWiFiConnection* wireless_setting, TQWidget* parent, const char* name, WFlags fl)
|
|
|
|
: ConnectionSettingWirelessSecurityWPAPSK(parent, name, fl)
|
|
|
|
: ConnectionSettingWirelessSecurityWPAPSK(parent, name, fl)
|
|
|
|
, _security_setting(security_setting)
|
|
|
|
, _security_setting(security_setting)
|
|
|
|
, _wireless_setting(wireless_setting)
|
|
|
|
, _wireless_setting(wireless_setting)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
txtPSK->setText(_security_setting->getPSK());
|
|
|
|
if (_security_setting->securitySettings.secretsValid) {
|
|
|
|
|
|
|
|
txtPSK->setText(_security_setting->securitySettings.psk);
|
|
|
|
|
|
|
|
}
|
|
|
|
connect(txtPSK, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotPSKChanged(const TQString&)));
|
|
|
|
connect(txtPSK, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotPSKChanged(const TQString&)));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -440,7 +466,8 @@ WirelessSecurityWPAPSKImpl::slotPSKChanged(const TQString& psk)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (_wireless_setting)
|
|
|
|
if (_wireless_setting)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
_security_setting->setPSK(psk);
|
|
|
|
_security_setting->securitySettings.psk = psk;
|
|
|
|
|
|
|
|
_security_setting->securitySettings.secretsValid = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -464,7 +491,7 @@ WirelessSecurityWPAPSKImpl::String2Hex(TQByteArray bytes, int final_len) const
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
class WirelessSecurityEAPImpl
|
|
|
|
class WirelessSecurityEAPImpl
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
WirelessSecurityEAPImpl::WirelessSecurityEAPImpl(IEEE8021x* security_setting, WirelessSecurityPhase2Impl* phase2_widget, TQWidget* parent, const char* name, WFlags fl)
|
|
|
|
WirelessSecurityEAPImpl::WirelessSecurityEAPImpl(TDEWiFiConnection* security_setting, WirelessSecurityPhase2Impl* phase2_widget, TQWidget* parent, const char* name, WFlags fl)
|
|
|
|
: ConnectionSettingWirelessSecurityEAP(parent, name, fl)
|
|
|
|
: ConnectionSettingWirelessSecurityEAP(parent, name, fl)
|
|
|
|
, _security_setting(security_setting)
|
|
|
|
, _security_setting(security_setting)
|
|
|
|
, _phase2_widget(phase2_widget)
|
|
|
|
, _phase2_widget(phase2_widget)
|
|
|
@ -472,42 +499,44 @@ WirelessSecurityEAPImpl::WirelessSecurityEAPImpl(IEEE8021x* security_setting, Wi
|
|
|
|
// insert all EAP-Methods
|
|
|
|
// insert all EAP-Methods
|
|
|
|
int index = 0;
|
|
|
|
int index = 0;
|
|
|
|
cboMethod->insertItem(i18n("None"), index);
|
|
|
|
cboMethod->insertItem(i18n("None"), index);
|
|
|
|
_eapIndexMap[index] = IEEE8021x::EAP_PHASE1_NONE;
|
|
|
|
_eapIndexMap[index] = TDENetworkIEEE8021xType::None;
|
|
|
|
|
|
|
|
|
|
|
|
cboMethod->insertItem(i18n("TTLS"), ++index);
|
|
|
|
cboMethod->insertItem(i18n("TTLS"), ++index);
|
|
|
|
_eapIndexMap[index] = IEEE8021x::EAP_PHASE1_TTLS;
|
|
|
|
_eapIndexMap[index] = TDENetworkIEEE8021xType::TTLS;
|
|
|
|
|
|
|
|
|
|
|
|
cboMethod->insertItem(i18n("PEAP"), ++index);
|
|
|
|
cboMethod->insertItem(i18n("PEAP"), ++index);
|
|
|
|
_eapIndexMap[index] = IEEE8021x::EAP_PHASE1_PEAP;
|
|
|
|
_eapIndexMap[index] = TDENetworkIEEE8021xType::PEAP;
|
|
|
|
|
|
|
|
|
|
|
|
cboMethod->insertItem(i18n("TLS"), ++index);
|
|
|
|
cboMethod->insertItem(i18n("TLS"), ++index);
|
|
|
|
_eapIndexMap[index] = IEEE8021x::EAP_PHASE1_TLS;
|
|
|
|
_eapIndexMap[index] = TDENetworkIEEE8021xType::TLS;
|
|
|
|
|
|
|
|
|
|
|
|
cboMethod->insertItem(i18n("Leap"), ++index);
|
|
|
|
cboMethod->insertItem(i18n("Leap"), ++index);
|
|
|
|
_eapIndexMap[index] = IEEE8021x::EAP_PHASE1_LEAP;
|
|
|
|
_eapIndexMap[index] = TDENetworkIEEE8021xType::LEAP;
|
|
|
|
|
|
|
|
|
|
|
|
cboMethod->insertItem(i18n("MD5"), ++index);
|
|
|
|
cboMethod->insertItem(i18n("MD5"), ++index);
|
|
|
|
_eapIndexMap[index] = IEEE8021x::EAP_PHASE1_MD5;
|
|
|
|
_eapIndexMap[index] = TDENetworkIEEE8021xType::MD5;
|
|
|
|
|
|
|
|
|
|
|
|
cboMethod->insertItem(i18n("FAST"), ++index);
|
|
|
|
cboMethod->insertItem(i18n("FAST"), ++index);
|
|
|
|
_eapIndexMap[index] = IEEE8021x::EAP_PHASE1_FAST;
|
|
|
|
_eapIndexMap[index] = TDENetworkIEEE8021xType::Fast;
|
|
|
|
|
|
|
|
|
|
|
|
cboMethod->insertItem(i18n("SIM"), ++index);
|
|
|
|
cboMethod->insertItem(i18n("SIM"), ++index);
|
|
|
|
_eapIndexMap[index] = IEEE8021x::EAP_PHASE1_SIM;
|
|
|
|
_eapIndexMap[index] = TDENetworkIEEE8021xType::SIM;
|
|
|
|
|
|
|
|
|
|
|
|
// preselect the correct method
|
|
|
|
// preselect the correct method
|
|
|
|
TQBiDirectionalMap<int, IEEE8021x::EAP_PHASE1>::Iterator it = _eapIndexMap.findData(_security_setting->getEAP());
|
|
|
|
TQBiDirectionalMap<int, TDENetworkIEEE8021xType::TDENetworkIEEE8021xType>::Iterator it = _eapIndexMap.findData(_security_setting->eapConfig.type);
|
|
|
|
cboMethod->setCurrentItem(it.key());
|
|
|
|
cboMethod->setCurrentItem(it.key());
|
|
|
|
|
|
|
|
|
|
|
|
// update phase2 combobox
|
|
|
|
// update phase2 combobox
|
|
|
|
_phase2_widget->setAllowedPhase2Methods(_security_setting->getAllowedPhase2Methods());
|
|
|
|
_phase2_widget->setAllowedPhase2Methods(_security_setting->eapConfig.allowedPhase2EAPMethods);
|
|
|
|
|
|
|
|
|
|
|
|
txtIdentity->setText(_security_setting->getIdentity());
|
|
|
|
txtIdentity->setText(_security_setting->eapConfig.userName);
|
|
|
|
txtAnonIdentity->setText(_security_setting->getAnonIdentity());
|
|
|
|
txtAnonIdentity->setText(_security_setting->eapConfig.anonymousUserName);
|
|
|
|
txtPassword->setText(_security_setting->getPassword());
|
|
|
|
if (_security_setting->eapConfig.secretsValid) {
|
|
|
|
|
|
|
|
txtPassword->setText(_security_setting->eapConfig.password);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
chkCAStore->setChecked(_security_setting->getUseSystemCaCert());
|
|
|
|
chkCAStore->setChecked(_security_setting->eapConfig.forceSystemCaCertificates);
|
|
|
|
kURLCACert->setEnabled(!_security_setting->getUseSystemCaCert());
|
|
|
|
kURLCACert->setEnabled(!_security_setting->eapConfig.forceSystemCaCertificates);
|
|
|
|
|
|
|
|
|
|
|
|
// get notified if the method changes
|
|
|
|
// get notified if the method changes
|
|
|
|
connect(cboMethod, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotMethodChanged(int)));
|
|
|
|
connect(cboMethod, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotMethodChanged(int)));
|
|
|
@ -519,42 +548,43 @@ WirelessSecurityEAPImpl::WirelessSecurityEAPImpl(IEEE8021x* security_setting, Wi
|
|
|
|
|
|
|
|
|
|
|
|
void WirelessSecurityEAPImpl::slotUseSystemCaCertChanged(bool on)
|
|
|
|
void WirelessSecurityEAPImpl::slotUseSystemCaCertChanged(bool on)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
_security_setting->setUseSystemCaCert(on);
|
|
|
|
_security_setting->eapConfig.forceSystemCaCertificates = on;
|
|
|
|
kURLCACert->setEnabled(!on);
|
|
|
|
kURLCACert->setEnabled(!on);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void WirelessSecurityEAPImpl::slotMethodChanged(int index)
|
|
|
|
void WirelessSecurityEAPImpl::slotMethodChanged(int index)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// new method choosen
|
|
|
|
// new method choosen
|
|
|
|
IEEE8021x::EAP_PHASE1 eap = _eapIndexMap[index];
|
|
|
|
TDENetworkIEEE8021xType::TDENetworkIEEE8021xType eap = _eapIndexMap[index];
|
|
|
|
_security_setting->setEAP(eap);
|
|
|
|
_security_setting->eapConfig.type = eap;
|
|
|
|
|
|
|
|
|
|
|
|
_phase2_widget->setAllowedPhase2Methods(_security_setting->getAllowedPhase2Methods());
|
|
|
|
_phase2_widget->setAllowedPhase2Methods(_security_setting->eapConfig.allowedPhase2EAPMethods);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void WirelessSecurityEAPImpl::slotIdentityChanged(const TQString& identity)
|
|
|
|
void WirelessSecurityEAPImpl::slotIdentityChanged(const TQString& identity)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
_security_setting->setIdentity(identity);
|
|
|
|
_security_setting->eapConfig.userName = identity;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void WirelessSecurityEAPImpl::slotAnonIdentityChanged(const TQString& identity)
|
|
|
|
void WirelessSecurityEAPImpl::slotAnonIdentityChanged(const TQString& identity)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
_security_setting->setAnonIdentity(identity);
|
|
|
|
_security_setting->eapConfig.anonymousUserName = identity;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void WirelessSecurityEAPImpl::slotPasswordChanged(const TQString& pwd)
|
|
|
|
void WirelessSecurityEAPImpl::slotPasswordChanged(const TQString& pwd)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
_security_setting->setPassword(TQString(txtPassword->password()));
|
|
|
|
_security_setting->eapConfig.password = TQString(txtPassword->password());
|
|
|
|
|
|
|
|
_security_setting->eapConfig.secretsValid = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
class WirelessSecurityPhase2Impl
|
|
|
|
class WirelessSecurityPhase2Impl
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
WirelessSecurityPhase2Impl::WirelessSecurityPhase2Impl(IEEE8021x* security_setting, TQWidget* parent, const char* name, WFlags fl)
|
|
|
|
WirelessSecurityPhase2Impl::WirelessSecurityPhase2Impl(TDEWiFiConnection* security_setting, TQWidget* parent, const char* name, WFlags fl)
|
|
|
|
: ConnectionSettingWirelessSecurityPhase2(parent, name, fl)
|
|
|
|
: ConnectionSettingWirelessSecurityPhase2(parent, name, fl)
|
|
|
|
, _security_setting(security_setting)
|
|
|
|
, _security_setting(security_setting)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
_allowed_methods.append(IEEE8021x::EAP_PHASE2_AUTH_NONE);
|
|
|
|
_allowed_methods.append(TDENetworkIEEE8021xType::None);
|
|
|
|
updateMethodComboBox();
|
|
|
|
updateMethodComboBox();
|
|
|
|
|
|
|
|
|
|
|
|
connect(cboPhase2Method, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotPhase2MethodChanged(int)));
|
|
|
|
connect(cboPhase2Method, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotPhase2MethodChanged(int)));
|
|
|
@ -567,79 +597,79 @@ void WirelessSecurityPhase2Impl::updateMethodComboBox()
|
|
|
|
cboPhase2Method->clear();
|
|
|
|
cboPhase2Method->clear();
|
|
|
|
_eapIndexMap.clear();
|
|
|
|
_eapIndexMap.clear();
|
|
|
|
|
|
|
|
|
|
|
|
for (TQValueList<IEEE8021x::EAP_PHASE2>::Iterator it = _allowed_methods.begin(); it != _allowed_methods.end(); ++it)
|
|
|
|
for (TQValueList<TDENetworkIEEE8021xType::TDENetworkIEEE8021xType>::Iterator it = _allowed_methods.begin(); it != _allowed_methods.end(); ++it)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if ((*it) == IEEE8021x::EAP_PHASE2_AUTH_NONE)
|
|
|
|
if ((*it) == TDENetworkIEEE8021xType::None)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
cboPhase2Method->insertItem(i18n("None"), index);
|
|
|
|
cboPhase2Method->insertItem(i18n("None"), index);
|
|
|
|
_eapIndexMap[index] = IEEE8021x::EAP_PHASE2_AUTH_NONE;
|
|
|
|
_eapIndexMap[index] = TDENetworkIEEE8021xType::None;
|
|
|
|
index++;
|
|
|
|
index++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if ((*it) == IEEE8021x::EAP_PHASE2_AUTH_MSCHAPV2)
|
|
|
|
else if ((*it) == TDENetworkIEEE8021xType::MSCHAPV2)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
cboPhase2Method->insertItem(i18n("MSCHAPv2"), index);
|
|
|
|
cboPhase2Method->insertItem(i18n("MSCHAPv2"), index);
|
|
|
|
_eapIndexMap[index] = IEEE8021x::EAP_PHASE2_AUTH_MSCHAPV2;
|
|
|
|
_eapIndexMap[index] = TDENetworkIEEE8021xType::MSCHAPV2;
|
|
|
|
index++;
|
|
|
|
index++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if ((*it) == IEEE8021x::EAP_PHASE2_AUTH_PAP)
|
|
|
|
else if ((*it) == TDENetworkIEEE8021xType::PAP)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
cboPhase2Method->insertItem(i18n("PAP"), index);
|
|
|
|
cboPhase2Method->insertItem(i18n("PAP"), index);
|
|
|
|
_eapIndexMap[index] = IEEE8021x::EAP_PHASE2_AUTH_PAP;
|
|
|
|
_eapIndexMap[index] = TDENetworkIEEE8021xType::PAP;
|
|
|
|
index++;
|
|
|
|
index++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if ((*it) == IEEE8021x::EAP_PHASE2_AUTH_CHAP)
|
|
|
|
else if ((*it) == TDENetworkIEEE8021xType::CHAP)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
cboPhase2Method->insertItem(i18n("CHAP"), index);
|
|
|
|
cboPhase2Method->insertItem(i18n("CHAP"), index);
|
|
|
|
_eapIndexMap[index] = IEEE8021x::EAP_PHASE2_AUTH_CHAP;
|
|
|
|
_eapIndexMap[index] = TDENetworkIEEE8021xType::CHAP;
|
|
|
|
index++;
|
|
|
|
index++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if ((*it) == IEEE8021x::EAP_PHASE2_AUTH_MSCHAP)
|
|
|
|
else if ((*it) == TDENetworkIEEE8021xType::MSCHAP)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
cboPhase2Method->insertItem(i18n("MSCHAP"), index);
|
|
|
|
cboPhase2Method->insertItem(i18n("MSCHAP"), index);
|
|
|
|
_eapIndexMap[index] = IEEE8021x::EAP_PHASE2_AUTH_MSCHAP;
|
|
|
|
_eapIndexMap[index] = TDENetworkIEEE8021xType::MSCHAP;
|
|
|
|
index++;
|
|
|
|
index++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if ((*it) == IEEE8021x::EAP_PHASE2_AUTH_GTC)
|
|
|
|
else if ((*it) == TDENetworkIEEE8021xType::GTC)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
cboPhase2Method->insertItem(i18n("GTC"), index);
|
|
|
|
cboPhase2Method->insertItem(i18n("GTC"), index);
|
|
|
|
_eapIndexMap[index] = IEEE8021x::EAP_PHASE2_AUTH_GTC;
|
|
|
|
_eapIndexMap[index] = TDENetworkIEEE8021xType::GTC;
|
|
|
|
index++;
|
|
|
|
index++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if ((*it) == IEEE8021x::EAP_PHASE2_AUTH_OTP)
|
|
|
|
else if ((*it) == TDENetworkIEEE8021xType::OTP)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
cboPhase2Method->insertItem(i18n("OTP"), index);
|
|
|
|
cboPhase2Method->insertItem(i18n("OTP"), index);
|
|
|
|
_eapIndexMap[index] = IEEE8021x::EAP_PHASE2_AUTH_OTP;
|
|
|
|
_eapIndexMap[index] = TDENetworkIEEE8021xType::OTP;
|
|
|
|
index++;
|
|
|
|
index++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if ((*it) == IEEE8021x::EAP_PHASE2_AUTH_MD5)
|
|
|
|
else if ((*it) == TDENetworkIEEE8021xType::MD5)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
cboPhase2Method->insertItem(i18n("MD5"), index);
|
|
|
|
cboPhase2Method->insertItem(i18n("MD5"), index);
|
|
|
|
_eapIndexMap[index] = IEEE8021x::EAP_PHASE2_AUTH_MD5;
|
|
|
|
_eapIndexMap[index] = TDENetworkIEEE8021xType::MD5;
|
|
|
|
index++;
|
|
|
|
index++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if ((*it) == IEEE8021x::EAP_PHASE2_AUTH_TLS)
|
|
|
|
else if ((*it) == TDENetworkIEEE8021xType::TLS)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
cboPhase2Method->insertItem(i18n("TLS"), index);
|
|
|
|
cboPhase2Method->insertItem(i18n("TLS"), index);
|
|
|
|
_eapIndexMap[index] = IEEE8021x::EAP_PHASE2_AUTH_TLS;
|
|
|
|
_eapIndexMap[index] = TDENetworkIEEE8021xType::TLS;
|
|
|
|
index++;
|
|
|
|
index++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// preselect the correct method
|
|
|
|
// preselect the correct method
|
|
|
|
TQBiDirectionalMap<int, IEEE8021x::EAP_PHASE2>::Iterator it = _eapIndexMap.findData(_security_setting->getPhase2EAP());
|
|
|
|
TQBiDirectionalMap<int, TDENetworkIEEE8021xType::TDENetworkIEEE8021xType>::Iterator it = _eapIndexMap.findData(_security_setting->eapConfig.phase2EAPAuthMethod);
|
|
|
|
if (it != _eapIndexMap.end())
|
|
|
|
if (it != _eapIndexMap.end())
|
|
|
|
{
|
|
|
|
{
|
|
|
|
cboPhase2Method->setCurrentItem(it.key());
|
|
|
|
cboPhase2Method->setCurrentItem(it.key());
|
|
|
|
_security_setting->setPhase2EAP(it.data());
|
|
|
|
_security_setting->eapConfig.phase2EAPAuthMethod = it.data();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
cboPhase2Method->setCurrentItem(0);
|
|
|
|
cboPhase2Method->setCurrentItem(0);
|
|
|
|
_security_setting->setPhase2EAP(_eapIndexMap[0]);
|
|
|
|
_security_setting->eapConfig.phase2EAPAuthMethod = _eapIndexMap[0];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void WirelessSecurityPhase2Impl::setAllowedPhase2Methods(const TQValueList<IEEE8021x::EAP_PHASE2>& list)
|
|
|
|
void WirelessSecurityPhase2Impl::setAllowedPhase2Methods(const TQValueList<TDENetworkIEEE8021xType::TDENetworkIEEE8021xType>& list)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
_allowed_methods = list;
|
|
|
|
_allowed_methods = list;
|
|
|
|
updateMethodComboBox();
|
|
|
|
updateMethodComboBox();
|
|
|
@ -648,20 +678,20 @@ void WirelessSecurityPhase2Impl::setAllowedPhase2Methods(const TQValueList<IEEE8
|
|
|
|
void WirelessSecurityPhase2Impl::slotPhase2MethodChanged(int index)
|
|
|
|
void WirelessSecurityPhase2Impl::slotPhase2MethodChanged(int index)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// new method choosen
|
|
|
|
// new method choosen
|
|
|
|
IEEE8021x::EAP_PHASE2 eap = _eapIndexMap[index];
|
|
|
|
TDENetworkIEEE8021xType::TDENetworkIEEE8021xType eap = _eapIndexMap[index];
|
|
|
|
_security_setting->setPhase2EAP(eap);
|
|
|
|
_security_setting->eapConfig.phase2EAPAuthMethod = eap;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
class WirelessSecurityWidgetImpl
|
|
|
|
class WirelessSecurityWidgetImpl
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
WirelessSecurityWidgetImpl::WirelessSecurityWidgetImpl(Connection* conn, bool new_conn, TQWidget* parent, const char* name, WFlags fl)
|
|
|
|
WirelessSecurityWidgetImpl::WirelessSecurityWidgetImpl(TDENetworkConnection* conn, bool new_conn, TQWidget* parent, const char* name, WFlags fl)
|
|
|
|
: WidgetInterface(parent, name, fl)
|
|
|
|
: WidgetInterface(parent, name, fl)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
_security_setting = dynamic_cast<WirelessSecurity*> (conn->getSetting(NM_SETTING_WIRELESS_SECURITY_SETTING_NAME));
|
|
|
|
_security_setting = dynamic_cast<TDEWiFiConnection*> (conn);
|
|
|
|
_wireless_setting = dynamic_cast<Wireless*> (conn->getSetting(NM_SETTING_WIRELESS_SETTING_NAME));
|
|
|
|
_wireless_setting = dynamic_cast<TDEWiFiConnection*> (conn);
|
|
|
|
_ieee8021x_setting = dynamic_cast<IEEE8021x*> (conn->getSetting(NM_SETTING_802_1X_SETTING_NAME));
|
|
|
|
_ieee8021x_setting = dynamic_cast<TDEWiFiConnection*> (conn);
|
|
|
|
_new_conn = new_conn;
|
|
|
|
_new_conn = new_conn;
|
|
|
|
|
|
|
|
|
|
|
|
TQVBoxLayout* layout = new TQVBoxLayout(this, 1, 1);
|
|
|
|
TQVBoxLayout* layout = new TQVBoxLayout(this, 1, 1);
|
|
|
@ -737,43 +767,43 @@ WirelessSecurityWidgetImpl::comboSecurityInit()
|
|
|
|
|
|
|
|
|
|
|
|
// TODO: Preselect the right security method
|
|
|
|
// TODO: Preselect the right security method
|
|
|
|
// We should have an Essid already, fetch all possible APs
|
|
|
|
// We should have an Essid already, fetch all possible APs
|
|
|
|
TQValueList<AccessPoint *> aps;
|
|
|
|
TQValueList<TDENetworkWiFiAPInfo*> aps;
|
|
|
|
if (_new_conn && !_wireless_setting->getEssid().isEmpty())
|
|
|
|
if (_new_conn && !_wireless_setting->SSID.isEmpty()) {
|
|
|
|
{
|
|
|
|
aps = WirelessManager::getAccessPointsForEssid(_wireless_setting->SSID);
|
|
|
|
aps = WirelessManager::getAccessPointsForEssid(_wireless_setting->getEssid());
|
|
|
|
|
|
|
|
#if 0
|
|
|
|
#if 0
|
|
|
|
kdDebug() << "Hugo " << TQString(TQCString(_wireless_setting->getEssid())).ascii() << endl;
|
|
|
|
kdDebug() << "Hugo " << TQString(TQCString(_wireless_setting->getEssid())).ascii() << endl;
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (!aps.isEmpty())
|
|
|
|
if (!aps.isEmpty()) {
|
|
|
|
{
|
|
|
|
|
|
|
|
// if at least one AP has this security setting show the entry in the combobox
|
|
|
|
// if at least one AP has this security setting show the entry in the combobox
|
|
|
|
for (TQValueList<AccessPoint*>::Iterator it = aps.begin(); it != aps.end(); ++it)
|
|
|
|
for (TQValueList<TDENetworkWiFiAPInfo*>::Iterator it = aps.begin(); it != aps.end(); ++it) {
|
|
|
|
{
|
|
|
|
if (((*it)->wpaFlags & TDENetworkWiFiAPFlags::PrivacySupport) || ((*it)->rsnFlags & TDENetworkWiFiAPFlags::PrivacySupport)) {
|
|
|
|
if((*it)->isEncrypted())
|
|
|
|
kdDebug() << "AP " << (*it)->friendlySSID().ascii() << " is encrypted" << endl;
|
|
|
|
{
|
|
|
|
if ((((*it)->rsnFlags & TDENetworkWiFiAPFlags::EncryptionFlagsMask) != TDENetworkWiFiAPFlags::None) || (((*it)->wpaFlags & TDENetworkWiFiAPFlags::EncryptionFlagsMask) != TDENetworkWiFiAPFlags::None)) {
|
|
|
|
kdDebug() << "AP " << (*it)->getDisplaySsid().ascii() << " is encrypted" << endl;
|
|
|
|
|
|
|
|
if ((*it)->getRsnFlags() != NM_802_11_AP_SEC_NONE || (*it)->getWpaFlags() != NM_802_11_AP_SEC_NONE)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
// WPA or RSN
|
|
|
|
// WPA or RSN
|
|
|
|
if ((*it)->getRsnFlags() & NM_802_11_AP_SEC_KEY_MGMT_PSK || (*it)->getWpaFlags() & NM_802_11_AP_SEC_KEY_MGMT_PSK)
|
|
|
|
if ((*it)->rsnFlags & TDENetworkWiFiAPFlags::KeyManagementPSK || (*it)->wpaFlags & TDENetworkWiFiAPFlags::KeyManagementPSK) {
|
|
|
|
if (!allowed_methods.contains(SECURITY_WPA_PSK))
|
|
|
|
if (!allowed_methods.contains(SECURITY_WPA_PSK)) {
|
|
|
|
allowed_methods.append(SECURITY_WPA_PSK);
|
|
|
|
allowed_methods.append(SECURITY_WPA_PSK);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ((*it)->rsnFlags & TDENetworkWiFiAPFlags::KeyManagement80211 || (*it)->wpaFlags & TDENetworkWiFiAPFlags::KeyManagement80211) {
|
|
|
|
if ((*it)->getRsnFlags() & NM_802_11_AP_SEC_KEY_MGMT_802_1X || (*it)->getWpaFlags() & NM_802_11_AP_SEC_KEY_MGMT_802_1X)
|
|
|
|
if (!allowed_methods.contains(SECURITY_WPA_EAP)) {
|
|
|
|
if (!allowed_methods.contains(SECURITY_WPA_EAP))
|
|
|
|
|
|
|
|
allowed_methods.append(SECURITY_WPA_EAP);
|
|
|
|
allowed_methods.append(SECURITY_WPA_EAP);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// No WPA & RSN => WEP or dynamic WEP with 802.1x authentication
|
|
|
|
// No WPA & RSN => WEP or dynamic WEP with 802.1x authentication
|
|
|
|
// TODO: an AP can provide WEP in addition to WPA
|
|
|
|
// TODO: an AP can provide WEP in addition to WPA
|
|
|
|
if (!allowed_methods.contains(SECURITY_WEP))
|
|
|
|
if (!allowed_methods.contains(SECURITY_WEP)) {
|
|
|
|
allowed_methods.append(SECURITY_WEP);
|
|
|
|
allowed_methods.append(SECURITY_WEP);
|
|
|
|
if (!allowed_methods.contains(SECURITY_IEEE8021X))
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!allowed_methods.contains(SECURITY_IEEE8021X)) {
|
|
|
|
allowed_methods.append(SECURITY_IEEE8021X);
|
|
|
|
allowed_methods.append(SECURITY_IEEE8021X);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// insert only allowed security methods
|
|
|
|
// insert only allowed security methods
|
|
|
|
if (allowed_methods.contains(SECURITY_WPA_PSK))
|
|
|
|
if (allowed_methods.contains(SECURITY_WPA_PSK))
|
|
|
@ -815,14 +845,14 @@ WirelessSecurityWidgetImpl::comboSecurityInit()
|
|
|
|
|
|
|
|
|
|
|
|
if (!_new_conn)
|
|
|
|
if (!_new_conn)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
switch(_security_setting->getKeyMgmt())
|
|
|
|
switch(_security_setting->securitySettings.keyType)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
case WirelessSecurity::KEY_MGMT_NONE:
|
|
|
|
case TDENetworkWiFiKeyType::WEP:
|
|
|
|
if (_security_setting->getAuthAlg() == WirelessSecurity::AUTH_ALG_SHARED ||
|
|
|
|
if (_security_setting->securitySettings.authType == TDENetworkWiFiAuthType::Shared ||
|
|
|
|
!_security_setting->getWepKey(0).isEmpty() ||
|
|
|
|
!_security_setting->securitySettings.wepKey0.isEmpty() ||
|
|
|
|
!_security_setting->getWepKey(1).isEmpty() ||
|
|
|
|
!_security_setting->securitySettings.wepKey1.isEmpty() ||
|
|
|
|
!_security_setting->getWepKey(2).isEmpty() ||
|
|
|
|
!_security_setting->securitySettings.wepKey2.isEmpty() ||
|
|
|
|
!_security_setting->getWepKey(3).isEmpty() )
|
|
|
|
!_security_setting->securitySettings.wepKey3.isEmpty() )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
_mainWid->groupUseEncryption->setChecked(true);
|
|
|
|
_mainWid->groupUseEncryption->setChecked(true);
|
|
|
|
_mainWid->cboSecurity->setCurrentItem(SECURITY_WEP);
|
|
|
|
_mainWid->cboSecurity->setCurrentItem(SECURITY_WEP);
|
|
|
@ -831,17 +861,17 @@ WirelessSecurityWidgetImpl::comboSecurityInit()
|
|
|
|
else
|
|
|
|
else
|
|
|
|
_mainWid->groupUseEncryption->setChecked(false);
|
|
|
|
_mainWid->groupUseEncryption->setChecked(false);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case WirelessSecurity::KEY_MGMT_WPA_PSK:
|
|
|
|
case TDENetworkWiFiKeyType::WPAInfrastructure:
|
|
|
|
_mainWid->groupUseEncryption->setChecked(true);
|
|
|
|
_mainWid->groupUseEncryption->setChecked(true);
|
|
|
|
_mainWid->cboSecurity->setCurrentItem(SECURITY_WPA_PSK);
|
|
|
|
_mainWid->cboSecurity->setCurrentItem(SECURITY_WPA_PSK);
|
|
|
|
slotComboSecurityActivated(_securityComboMap[SECURITY_WPA_PSK]);
|
|
|
|
slotComboSecurityActivated(_securityComboMap[SECURITY_WPA_PSK]);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case WirelessSecurity::KEY_MGMT_WPA_EAP:
|
|
|
|
case TDENetworkWiFiKeyType::WPAEnterprise:
|
|
|
|
_mainWid->groupUseEncryption->setChecked(true);
|
|
|
|
_mainWid->groupUseEncryption->setChecked(true);
|
|
|
|
_mainWid->cboSecurity->setCurrentItem(SECURITY_WPA_EAP);
|
|
|
|
_mainWid->cboSecurity->setCurrentItem(SECURITY_WPA_EAP);
|
|
|
|
slotComboSecurityActivated(_securityComboMap[SECURITY_WPA_EAP]);
|
|
|
|
slotComboSecurityActivated(_securityComboMap[SECURITY_WPA_EAP]);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case WirelessSecurity::KEY_MGMT_IEEE8021X:
|
|
|
|
case TDENetworkWiFiKeyType::DynamicWEP:
|
|
|
|
_mainWid->groupUseEncryption->setChecked(true);
|
|
|
|
_mainWid->groupUseEncryption->setChecked(true);
|
|
|
|
_mainWid->cboSecurity->setCurrentItem(SECURITY_IEEE8021X);
|
|
|
|
_mainWid->cboSecurity->setCurrentItem(SECURITY_IEEE8021X);
|
|
|
|
slotComboSecurityActivated(_securityComboMap[SECURITY_IEEE8021X]);
|
|
|
|
slotComboSecurityActivated(_securityComboMap[SECURITY_IEEE8021X]);
|
|
|
@ -872,7 +902,7 @@ WirelessSecurityWidgetImpl::comboSecurityInit()
|
|
|
|
void
|
|
|
|
void
|
|
|
|
WirelessSecurityWidgetImpl::slotUseEncryptionToggled(bool on)
|
|
|
|
WirelessSecurityWidgetImpl::slotUseEncryptionToggled(bool on)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
_wireless_setting->setSecurity(on ? _security_setting->getType() : NULL);
|
|
|
|
_wireless_setting->securityRequired = on;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
void
|
|
|
@ -968,28 +998,28 @@ WirelessSecurityWidgetImpl::slotExtraSettingsToggled(bool on)
|
|
|
|
void
|
|
|
|
void
|
|
|
|
WirelessSecurityWidgetImpl::configureForWEP()
|
|
|
|
WirelessSecurityWidgetImpl::configureForWEP()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
_security_setting->setKeyMgmt(WirelessSecurity::KEY_MGMT_NONE);
|
|
|
|
_security_setting->securitySettings.keyType = TDENetworkWiFiKeyType::WEP;
|
|
|
|
configureWidgets(SECURITY_WEP);
|
|
|
|
configureWidgets(SECURITY_WEP);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
void
|
|
|
|
WirelessSecurityWidgetImpl::configureForWPAPSK()
|
|
|
|
WirelessSecurityWidgetImpl::configureForWPAPSK()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
_security_setting->setKeyMgmt(WirelessSecurity::KEY_MGMT_WPA_PSK);
|
|
|
|
_security_setting->securitySettings.keyType = TDENetworkWiFiKeyType::WPAInfrastructure;
|
|
|
|
configureWidgets(SECURITY_WPA_PSK);
|
|
|
|
configureWidgets(SECURITY_WPA_PSK);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
void
|
|
|
|
WirelessSecurityWidgetImpl::configureForWPAEAP()
|
|
|
|
WirelessSecurityWidgetImpl::configureForWPAEAP()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
_security_setting->setKeyMgmt(WirelessSecurity::KEY_MGMT_WPA_EAP);
|
|
|
|
_security_setting->securitySettings.keyType = TDENetworkWiFiKeyType::WPAEnterprise;
|
|
|
|
configureWidgets(SECURITY_WPA_EAP);
|
|
|
|
configureWidgets(SECURITY_WPA_EAP);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
void
|
|
|
|
WirelessSecurityWidgetImpl::configureForIEEE8021X()
|
|
|
|
WirelessSecurityWidgetImpl::configureForIEEE8021X()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
_security_setting->setKeyMgmt(WirelessSecurity::KEY_MGMT_IEEE8021X);
|
|
|
|
_security_setting->securitySettings.keyType = TDENetworkWiFiKeyType::DynamicWEP;
|
|
|
|
configureWidgets(SECURITY_IEEE8021X);
|
|
|
|
configureWidgets(SECURITY_IEEE8021X);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|