|
|
|
@ -62,11 +62,13 @@ using namespace ConnectionSettings;
|
|
|
|
|
/*
|
|
|
|
|
class WirelessSecurityWEPImpl
|
|
|
|
|
*/
|
|
|
|
|
WirelessSecurityWEPImpl::WirelessSecurityWEPImpl(TDEWiFiConnection* sec, TQWidget* parent, const char* name, WFlags fl)
|
|
|
|
|
WirelessSecurityWEPImpl::WirelessSecurityWEPImpl(TDEWiFiConnection* sec, TQWidget* parent, ConnectionSettingsDialogImpl* connsettings, const char* name, WFlags fl)
|
|
|
|
|
: ConnectionSettingWirelessSecurityWEP(parent, name, fl)
|
|
|
|
|
, _security_setting(sec)
|
|
|
|
|
, _wepKeyType( WEPKEY_TYPE_HEX )
|
|
|
|
|
{
|
|
|
|
|
_parentdialog = connsettings;
|
|
|
|
|
|
|
|
|
|
cboAuthentication->insertItem(i18n("Open System"), 0);
|
|
|
|
|
cboAuthentication->insertItem(i18n("Shared Key"), 1);
|
|
|
|
|
if (_security_setting->securitySettings.authType == TDENetworkWiFiAuthType::Open) {
|
|
|
|
@ -75,11 +77,22 @@ WirelessSecurityWEPImpl::WirelessSecurityWEPImpl(TDEWiFiConnection* sec, TQWidge
|
|
|
|
|
else if (_security_setting->securitySettings.authType == TDENetworkWiFiAuthType::Shared) {
|
|
|
|
|
cboAuthentication->setCurrentItem(1);
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
// Set up defaults
|
|
|
|
|
_security_setting->securitySettings.authType = TDENetworkWiFiAuthType::Open;
|
|
|
|
|
cboAuthentication->setCurrentItem(0);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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 128-bit passphrase"), WEPKEY_TYPE_PASSPHRASE);
|
|
|
|
|
cbKeyType->setCurrentItem(_wepKeyType );
|
|
|
|
|
cbKeyType->setCurrentItem( _wepKeyType );
|
|
|
|
|
|
|
|
|
|
if (_security_setting->securitySettings.authType == TDENetworkWiFiAuthType::Other) {
|
|
|
|
|
// Set up defaults
|
|
|
|
|
_security_setting->securitySettings.wepKeyType = TDENetworkWepKeyType::Hexadecimal;
|
|
|
|
|
cbKeyType->setCurrentItem(WEPKEY_TYPE_HEX);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
txtWEPKey0->setText(_security_setting->securitySettings.wepKey0);
|
|
|
|
|
txtWEPKey1->setText(_security_setting->securitySettings.wepKey1);
|
|
|
|
@ -126,37 +139,64 @@ void WirelessSecurityWEPImpl::slotAuthAlgChanged(int index)
|
|
|
|
|
else if (index == 1) {
|
|
|
|
|
_security_setting->securitySettings.authType = TDENetworkWiFiAuthType::Shared;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (_parentdialog) _parentdialog->slotEnableButtons(); // Update lockouts
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void WirelessSecurityWEPImpl::slotKeyTypeChanged(int index)
|
|
|
|
|
{
|
|
|
|
|
_wepKeyType = (WEPKEY_TYPE)index;
|
|
|
|
|
|
|
|
|
|
if (index == WEPKEY_TYPE_ASCII) {
|
|
|
|
|
_security_setting->securitySettings.wepKeyType = TDENetworkWepKeyType::Ascii;
|
|
|
|
|
}
|
|
|
|
|
else if (index == WEPKEY_TYPE_HEX) {
|
|
|
|
|
_security_setting->securitySettings.wepKeyType = TDENetworkWepKeyType::Hexadecimal;
|
|
|
|
|
}
|
|
|
|
|
else if (index == WEPKEY_TYPE_PASSPHRASE) {
|
|
|
|
|
_security_setting->securitySettings.wepKeyType = TDENetworkWepKeyType::Passphrase;
|
|
|
|
|
}
|
|
|
|
|
_security_setting->securitySettings.secretsValid = true;
|
|
|
|
|
|
|
|
|
|
// update all WEP-Keys here due to the new key_type
|
|
|
|
|
|
|
|
|
|
if (_parentdialog) _parentdialog->slotEnableButtons(); // Update lockouts
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void WirelessSecurityWEPImpl::slotWepKey0Changed(const TQString &key)
|
|
|
|
|
{
|
|
|
|
|
TQCString hashed = getHashedWEPKey(key, _wepKeyType);
|
|
|
|
|
_security_setting->securitySettings.wepKey0 = hashed;
|
|
|
|
|
_security_setting->securitySettings.secretsValid = true;
|
|
|
|
|
|
|
|
|
|
if (_parentdialog) _parentdialog->slotEnableButtons(); // Update lockouts
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void WirelessSecurityWEPImpl::slotWepKey1Changed(const TQString &key)
|
|
|
|
|
{
|
|
|
|
|
TQCString hashed = getHashedWEPKey(key, _wepKeyType);
|
|
|
|
|
_security_setting->securitySettings.wepKey1 = hashed;
|
|
|
|
|
_security_setting->securitySettings.secretsValid = true;
|
|
|
|
|
|
|
|
|
|
if (_parentdialog) _parentdialog->slotEnableButtons(); // Update lockouts
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void WirelessSecurityWEPImpl::slotWepKey2Changed(const TQString &key)
|
|
|
|
|
{
|
|
|
|
|
TQCString hashed = getHashedWEPKey(key, _wepKeyType);
|
|
|
|
|
_security_setting->securitySettings.wepKey2 = hashed;
|
|
|
|
|
_security_setting->securitySettings.secretsValid = true;
|
|
|
|
|
|
|
|
|
|
if (_parentdialog) _parentdialog->slotEnableButtons(); // Update lockouts
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void WirelessSecurityWEPImpl::slotWepKey3Changed(const TQString& key)
|
|
|
|
|
{
|
|
|
|
|
TQCString hashed = getHashedWEPKey(key, _wepKeyType);
|
|
|
|
|
_security_setting->securitySettings.wepKey3 = hashed;
|
|
|
|
|
_security_setting->securitySettings.secretsValid = true;
|
|
|
|
|
|
|
|
|
|
if (_parentdialog) _parentdialog->slotEnableButtons(); // Update lockouts
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void WirelessSecurityWEPImpl::slotWepIdx0Checked(bool check)
|
|
|
|
@ -164,6 +204,8 @@ void WirelessSecurityWEPImpl::slotWepIdx0Checked(bool check)
|
|
|
|
|
if (check) {
|
|
|
|
|
_security_setting->securitySettings.wepKeyIndex = 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (_parentdialog) _parentdialog->slotEnableButtons(); // Update lockouts
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void WirelessSecurityWEPImpl::slotWepIdx1Checked(bool check)
|
|
|
|
@ -171,6 +213,8 @@ void WirelessSecurityWEPImpl::slotWepIdx1Checked(bool check)
|
|
|
|
|
if (check) {
|
|
|
|
|
_security_setting->securitySettings.wepKeyIndex = 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (_parentdialog) _parentdialog->slotEnableButtons(); // Update lockouts
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void WirelessSecurityWEPImpl::slotWepIdx2Checked(bool check)
|
|
|
|
@ -178,6 +222,8 @@ void WirelessSecurityWEPImpl::slotWepIdx2Checked(bool check)
|
|
|
|
|
if (check) {
|
|
|
|
|
_security_setting->securitySettings.wepKeyIndex = 2;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (_parentdialog) _parentdialog->slotEnableButtons(); // Update lockouts
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void WirelessSecurityWEPImpl::slotWepIdx3Checked(bool check)
|
|
|
|
@ -185,6 +231,8 @@ void WirelessSecurityWEPImpl::slotWepIdx3Checked(bool check)
|
|
|
|
|
if (check) {
|
|
|
|
|
_security_setting->securitySettings.wepKeyIndex = 3;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (_parentdialog) _parentdialog->slotEnableButtons(); // Update lockouts
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
TQCString
|
|
|
|
@ -201,7 +249,7 @@ WirelessSecurityWEPImpl::getHashedWEPKey(TQString key, WEPKEY_TYPE type) const
|
|
|
|
|
return hashed;
|
|
|
|
|
break;
|
|
|
|
|
case WEPKEY_TYPE_PASSPHRASE:
|
|
|
|
|
return getWEP128PassphraseHash(TQCString(key));
|
|
|
|
|
return TQCString(key);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
return hashed;
|
|
|
|
@ -253,10 +301,12 @@ WirelessSecurityWEPImpl::String2Hex(TQByteArray bytes, int final_len) const
|
|
|
|
|
/*
|
|
|
|
|
class WirelessSecurityWEPEncryptionImpl
|
|
|
|
|
*/
|
|
|
|
|
WirelessSecurityWEPEncryptionImpl::WirelessSecurityWEPEncryptionImpl(TDEWiFiConnection* security_setting, TQWidget* parent, const char* name, WFlags fl)
|
|
|
|
|
WirelessSecurityWEPEncryptionImpl::WirelessSecurityWEPEncryptionImpl(TDEWiFiConnection* security_setting, TQWidget* parent, ConnectionSettingsDialogImpl* connsettings, const char* name, WFlags fl)
|
|
|
|
|
: ConnectionSettingWirelessSecurityWEPEncryption(parent, name, fl)
|
|
|
|
|
, _security_setting(security_setting)
|
|
|
|
|
{
|
|
|
|
|
_parentdialog = connsettings;
|
|
|
|
|
|
|
|
|
|
cboEncryption->insertItem(i18n("None"));
|
|
|
|
|
cboEncryption->insertItem(i18n("Dynamic WEP"));
|
|
|
|
|
}
|
|
|
|
@ -265,10 +315,12 @@ WirelessSecurityWEPEncryptionImpl::WirelessSecurityWEPEncryptionImpl(TDEWiFiConn
|
|
|
|
|
/*
|
|
|
|
|
class WirelessSecurityWPAVersionImpl
|
|
|
|
|
*/
|
|
|
|
|
WirelessSecurityWPAVersionImpl::WirelessSecurityWPAVersionImpl(TDEWiFiConnection* security_setting, TQWidget* parent, const char* name, WFlags fl)
|
|
|
|
|
WirelessSecurityWPAVersionImpl::WirelessSecurityWPAVersionImpl(TDEWiFiConnection* security_setting, TQWidget* parent, ConnectionSettingsDialogImpl* connsettings, const char* name, WFlags fl)
|
|
|
|
|
: ConnectionSettingWirelessSecurityWPAVersion(parent, name, fl)
|
|
|
|
|
, _security_setting(security_setting)
|
|
|
|
|
{
|
|
|
|
|
_parentdialog = connsettings;
|
|
|
|
|
|
|
|
|
|
cbWPA->setChecked(_security_setting->securitySettings.wpaVersion & TDENetworkWiFiWPAVersionFlags::WPA);
|
|
|
|
|
cbRSN->setChecked(_security_setting->securitySettings.wpaVersion & TDENetworkWiFiWPAVersionFlags::RSN);
|
|
|
|
|
|
|
|
|
@ -296,27 +348,35 @@ WirelessSecurityWPAVersionImpl::slotAuto(bool on)
|
|
|
|
|
}
|
|
|
|
|
_security_setting->securitySettings.wpaVersion = proto;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (_parentdialog) _parentdialog->slotEnableButtons(); // Update lockouts
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
WirelessSecurityWPAVersionImpl::slotWPA1(bool on)
|
|
|
|
|
{
|
|
|
|
|
SET_FLAG_IF_TRUE_CLEAR_IF_FALSE(_security_setting->securitySettings.wpaVersion, TDENetworkWiFiWPAVersionFlags::WPA, on);
|
|
|
|
|
|
|
|
|
|
if (_parentdialog) _parentdialog->slotEnableButtons(); // Update lockouts
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
WirelessSecurityWPAVersionImpl::slotWPA2(bool on)
|
|
|
|
|
{
|
|
|
|
|
SET_FLAG_IF_TRUE_CLEAR_IF_FALSE(_security_setting->securitySettings.wpaVersion, TDENetworkWiFiWPAVersionFlags::RSN, on);
|
|
|
|
|
|
|
|
|
|
if (_parentdialog) _parentdialog->slotEnableButtons(); // Update lockouts
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
class WirelessSecurityWPACipherImpl
|
|
|
|
|
*/
|
|
|
|
|
WirelessSecurityWPACipherImpl::WirelessSecurityWPACipherImpl(TDEWiFiConnection* security_setting, TQWidget* parent, const char* name, WFlags fl)
|
|
|
|
|
WirelessSecurityWPACipherImpl::WirelessSecurityWPACipherImpl(TDEWiFiConnection* security_setting, TQWidget* parent, ConnectionSettingsDialogImpl* connsettings, const char* name, WFlags fl)
|
|
|
|
|
: ConnectionSettingWirelessSecurityWPACipher(parent, name, fl)
|
|
|
|
|
, _security_setting(security_setting)
|
|
|
|
|
{
|
|
|
|
|
_parentdialog = connsettings;
|
|
|
|
|
|
|
|
|
|
connect(grpUseCipher, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotCipherChangedAuto(bool)));
|
|
|
|
|
|
|
|
|
|
connect(chkGroupCipherTKIP, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotGroupCipherChangedTKIP(bool)));
|
|
|
|
@ -334,7 +394,6 @@ WirelessSecurityWPACipherImpl::WirelessSecurityWPACipherImpl(TDEWiFiConnection*
|
|
|
|
|
chkGroupCipherTKIP->setChecked(_security_setting->securitySettings.allowedGroupWiseCiphers.contains(TDENetworkWiFiConnectionCipher::Any) || _security_setting->securitySettings.allowedGroupWiseCiphers.contains(TDENetworkWiFiConnectionCipher::CipherTKIP));
|
|
|
|
|
chkGroupCipherWEP40->setChecked(_security_setting->securitySettings.allowedGroupWiseCiphers.contains(TDENetworkWiFiConnectionCipher::Any) || _security_setting->securitySettings.allowedGroupWiseCiphers.contains(TDENetworkWiFiConnectionCipher::CipherWEP40));
|
|
|
|
|
chkGroupCipherWEP104->setChecked(_security_setting->securitySettings.allowedGroupWiseCiphers.contains(TDENetworkWiFiConnectionCipher::Any) || _security_setting->securitySettings.allowedGroupWiseCiphers.contains(TDENetworkWiFiConnectionCipher::CipherWEP104));
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
@ -377,8 +436,9 @@ WirelessSecurityWPACipherImpl::slotCipherChangedAuto(bool checked)
|
|
|
|
|
cipher.append(TDENetworkWiFiConnectionCipher::CipherCCMP);
|
|
|
|
|
}
|
|
|
|
|
_security_setting->securitySettings.allowedPairWiseCiphers = cipher;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (_parentdialog) _parentdialog->slotEnableButtons(); // Update lockouts
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
@ -390,6 +450,8 @@ WirelessSecurityWPACipherImpl::slotGroupCipherChangedTKIP(bool checked)
|
|
|
|
|
else {
|
|
|
|
|
_security_setting->securitySettings.allowedGroupWiseCiphers.remove(TDENetworkWiFiConnectionCipher::CipherTKIP);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (_parentdialog) _parentdialog->slotEnableButtons(); // Update lockouts
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
@ -401,6 +463,8 @@ WirelessSecurityWPACipherImpl::slotGroupCipherChangedCCMP(bool checked)
|
|
|
|
|
else {
|
|
|
|
|
_security_setting->securitySettings.allowedGroupWiseCiphers.remove(TDENetworkWiFiConnectionCipher::CipherCCMP);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (_parentdialog) _parentdialog->slotEnableButtons(); // Update lockouts
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
@ -412,6 +476,8 @@ WirelessSecurityWPACipherImpl::slotGroupCipherChangedWEP40(bool checked)
|
|
|
|
|
else {
|
|
|
|
|
_security_setting->securitySettings.allowedPairWiseCiphers.remove(TDENetworkWiFiConnectionCipher::CipherWEP40);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (_parentdialog) _parentdialog->slotEnableButtons(); // Update lockouts
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
@ -423,6 +489,8 @@ WirelessSecurityWPACipherImpl::slotGroupCipherChangedWEP104(bool checked)
|
|
|
|
|
else {
|
|
|
|
|
_security_setting->securitySettings.allowedPairWiseCiphers.remove(TDENetworkWiFiConnectionCipher::CipherWEP104);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (_parentdialog) _parentdialog->slotEnableButtons(); // Update lockouts
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
@ -434,6 +502,8 @@ WirelessSecurityWPACipherImpl::slotPairwiseCipherChangedTKIP(bool checked)
|
|
|
|
|
else {
|
|
|
|
|
_security_setting->securitySettings.allowedPairWiseCiphers.remove(TDENetworkWiFiConnectionCipher::CipherTKIP);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (_parentdialog) _parentdialog->slotEnableButtons(); // Update lockouts
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
@ -445,16 +515,20 @@ WirelessSecurityWPACipherImpl::slotPairwiseCipherChangedCCMP(bool checked)
|
|
|
|
|
else {
|
|
|
|
|
_security_setting->securitySettings.allowedPairWiseCiphers.remove(TDENetworkWiFiConnectionCipher::CipherCCMP);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (_parentdialog) _parentdialog->slotEnableButtons(); // Update lockouts
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
class WirelessSecurityWPAPSK
|
|
|
|
|
*/
|
|
|
|
|
WirelessSecurityWPAPSKImpl::WirelessSecurityWPAPSKImpl(TDEWiFiConnection* security_setting, TDEWiFiConnection* wireless_setting, TQWidget* parent, const char* name, WFlags fl)
|
|
|
|
|
WirelessSecurityWPAPSKImpl::WirelessSecurityWPAPSKImpl(TDEWiFiConnection* security_setting, TDEWiFiConnection* wireless_setting, TQWidget* parent, ConnectionSettingsDialogImpl* connsettings, const char* name, WFlags fl)
|
|
|
|
|
: ConnectionSettingWirelessSecurityWPAPSK(parent, name, fl)
|
|
|
|
|
, _security_setting(security_setting)
|
|
|
|
|
, _wireless_setting(wireless_setting)
|
|
|
|
|
{
|
|
|
|
|
_parentdialog = connsettings;
|
|
|
|
|
|
|
|
|
|
if (_security_setting->securitySettings.secretsValid) {
|
|
|
|
|
txtPSK->setText(_security_setting->securitySettings.psk);
|
|
|
|
|
}
|
|
|
|
@ -469,6 +543,8 @@ WirelessSecurityWPAPSKImpl::slotPSKChanged(const TQString& psk)
|
|
|
|
|
_security_setting->securitySettings.psk = psk;
|
|
|
|
|
_security_setting->securitySettings.secretsValid = true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (_parentdialog) _parentdialog->slotEnableButtons(); // Update lockouts
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
TQCString
|
|
|
|
@ -491,11 +567,13 @@ WirelessSecurityWPAPSKImpl::String2Hex(TQByteArray bytes, int final_len) const
|
|
|
|
|
/*
|
|
|
|
|
class WirelessSecurityEAPImpl
|
|
|
|
|
*/
|
|
|
|
|
WirelessSecurityEAPImpl::WirelessSecurityEAPImpl(TDEWiFiConnection* security_setting, WirelessSecurityPhase2Impl* phase2_widget, TQWidget* parent, const char* name, WFlags fl)
|
|
|
|
|
WirelessSecurityEAPImpl::WirelessSecurityEAPImpl(TDEWiFiConnection* security_setting, WirelessSecurityPhase2Impl* phase2_widget, TQWidget* parent, ConnectionSettingsDialogImpl* connsettings, const char* name, WFlags fl)
|
|
|
|
|
: ConnectionSettingWirelessSecurityEAP(parent, name, fl)
|
|
|
|
|
, _security_setting(security_setting)
|
|
|
|
|
, _phase2_widget(phase2_widget)
|
|
|
|
|
{
|
|
|
|
|
_parentdialog = connsettings;
|
|
|
|
|
|
|
|
|
|
// insert all EAP-Methods
|
|
|
|
|
int index = 0;
|
|
|
|
|
cboMethod->insertItem(i18n("None"), index);
|
|
|
|
@ -550,6 +628,8 @@ void WirelessSecurityEAPImpl::slotUseSystemCaCertChanged(bool on)
|
|
|
|
|
{
|
|
|
|
|
_security_setting->eapConfig.forceSystemCaCertificates = on;
|
|
|
|
|
kURLCACert->setEnabled(!on);
|
|
|
|
|
|
|
|
|
|
if (_parentdialog) _parentdialog->slotEnableButtons(); // Update lockouts
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void WirelessSecurityEAPImpl::slotMethodChanged(int index)
|
|
|
|
@ -559,31 +639,41 @@ void WirelessSecurityEAPImpl::slotMethodChanged(int index)
|
|
|
|
|
_security_setting->eapConfig.type = eap;
|
|
|
|
|
|
|
|
|
|
_phase2_widget->setAllowedPhase2Methods(_security_setting->eapConfig.allowedPhase2EAPMethods);
|
|
|
|
|
|
|
|
|
|
if (_parentdialog) _parentdialog->slotEnableButtons(); // Update lockouts
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void WirelessSecurityEAPImpl::slotIdentityChanged(const TQString& identity)
|
|
|
|
|
{
|
|
|
|
|
_security_setting->eapConfig.userName = identity;
|
|
|
|
|
|
|
|
|
|
if (_parentdialog) _parentdialog->slotEnableButtons(); // Update lockouts
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void WirelessSecurityEAPImpl::slotAnonIdentityChanged(const TQString& identity)
|
|
|
|
|
{
|
|
|
|
|
_security_setting->eapConfig.anonymousUserName = identity;
|
|
|
|
|
|
|
|
|
|
if (_parentdialog) _parentdialog->slotEnableButtons(); // Update lockouts
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void WirelessSecurityEAPImpl::slotPasswordChanged(const TQString& pwd)
|
|
|
|
|
{
|
|
|
|
|
_security_setting->eapConfig.password = TQString(txtPassword->password());
|
|
|
|
|
_security_setting->eapConfig.secretsValid = true;
|
|
|
|
|
|
|
|
|
|
if (_parentdialog) _parentdialog->slotEnableButtons(); // Update lockouts
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
class WirelessSecurityPhase2Impl
|
|
|
|
|
*/
|
|
|
|
|
WirelessSecurityPhase2Impl::WirelessSecurityPhase2Impl(TDEWiFiConnection* security_setting, TQWidget* parent, const char* name, WFlags fl)
|
|
|
|
|
WirelessSecurityPhase2Impl::WirelessSecurityPhase2Impl(TDEWiFiConnection* security_setting, TQWidget* parent, ConnectionSettingsDialogImpl* connsettings, const char* name, WFlags fl)
|
|
|
|
|
: ConnectionSettingWirelessSecurityPhase2(parent, name, fl)
|
|
|
|
|
, _security_setting(security_setting)
|
|
|
|
|
{
|
|
|
|
|
_parentdialog = connsettings;
|
|
|
|
|
|
|
|
|
|
_allowed_methods.append(TDENetworkIEEE8021xType::None);
|
|
|
|
|
updateMethodComboBox();
|
|
|
|
|
|
|
|
|
@ -680,6 +770,8 @@ void WirelessSecurityPhase2Impl::slotPhase2MethodChanged(int index)
|
|
|
|
|
// new method choosen
|
|
|
|
|
TDENetworkIEEE8021xType::TDENetworkIEEE8021xType eap = _eapIndexMap[index];
|
|
|
|
|
_security_setting->eapConfig.phase2EAPAuthMethod = eap;
|
|
|
|
|
|
|
|
|
|
if (_parentdialog) _parentdialog->slotEnableButtons(); // Update lockouts
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
@ -689,6 +781,7 @@ void WirelessSecurityPhase2Impl::slotPhase2MethodChanged(int index)
|
|
|
|
|
WirelessSecurityWidgetImpl::WirelessSecurityWidgetImpl(TDENetworkConnection* conn, bool new_conn, TQWidget* parent, const char* name, WFlags fl)
|
|
|
|
|
: WidgetInterface(parent, name, fl)
|
|
|
|
|
{
|
|
|
|
|
_parentdialog = dynamic_cast<ConnectionSettingsDialogImpl*>(parent);
|
|
|
|
|
_security_setting = dynamic_cast<TDEWiFiConnection*> (conn);
|
|
|
|
|
_wireless_setting = dynamic_cast<TDEWiFiConnection*> (conn);
|
|
|
|
|
_ieee8021x_setting = dynamic_cast<TDEWiFiConnection*> (conn);
|
|
|
|
@ -705,13 +798,13 @@ void
|
|
|
|
|
WirelessSecurityWidgetImpl::slotInit()
|
|
|
|
|
{
|
|
|
|
|
// create all security widgets...
|
|
|
|
|
TQWidget* wep = new WirelessSecurityWEPImpl(_security_setting, _mainWid->groupUseEncryption);
|
|
|
|
|
TQWidget* phase2 = new WirelessSecurityPhase2Impl(_ieee8021x_setting, _mainWid->groupUseEncryption);
|
|
|
|
|
TQWidget* eap = new WirelessSecurityEAPImpl(_ieee8021x_setting, (WirelessSecurityPhase2Impl*)phase2, _mainWid->groupUseEncryption);
|
|
|
|
|
TQWidget* wpaversion = new WirelessSecurityWPAVersionImpl(_security_setting, _mainWid->groupUseEncryption);
|
|
|
|
|
TQWidget* wpacipher = new WirelessSecurityWPACipherImpl(_security_setting, _mainWid->groupUseEncryption);
|
|
|
|
|
TQWidget* wpapsk = new WirelessSecurityWPAPSKImpl(_security_setting, _wireless_setting, _mainWid->groupUseEncryption);
|
|
|
|
|
TQWidget* wepencryption = new WirelessSecurityWEPEncryptionImpl(_security_setting, _mainWid->groupUseEncryption);
|
|
|
|
|
TQWidget* wep = new WirelessSecurityWEPImpl(_security_setting, _mainWid->groupUseEncryption, _parentdialog);
|
|
|
|
|
TQWidget* phase2 = new WirelessSecurityPhase2Impl(_ieee8021x_setting, _mainWid->groupUseEncryption, _parentdialog);
|
|
|
|
|
TQWidget* eap = new WirelessSecurityEAPImpl(_ieee8021x_setting, (WirelessSecurityPhase2Impl*)phase2, _mainWid->groupUseEncryption, _parentdialog);
|
|
|
|
|
TQWidget* wpaversion = new WirelessSecurityWPAVersionImpl(_security_setting, _mainWid->groupUseEncryption, _parentdialog);
|
|
|
|
|
TQWidget* wpacipher = new WirelessSecurityWPACipherImpl(_security_setting, _mainWid->groupUseEncryption, _parentdialog);
|
|
|
|
|
TQWidget* wpapsk = new WirelessSecurityWPAPSKImpl(_security_setting, _wireless_setting, _mainWid->groupUseEncryption, _parentdialog);
|
|
|
|
|
TQWidget* wepencryption = new WirelessSecurityWEPEncryptionImpl(_security_setting, _mainWid->groupUseEncryption, _parentdialog);
|
|
|
|
|
|
|
|
|
|
wep->setHidden(true);
|
|
|
|
|
eap->setHidden(true);
|
|
|
|
@ -903,6 +996,8 @@ void
|
|
|
|
|
WirelessSecurityWidgetImpl::slotUseEncryptionToggled(bool on)
|
|
|
|
|
{
|
|
|
|
|
_wireless_setting->securityRequired = on;
|
|
|
|
|
|
|
|
|
|
if (_parentdialog) _parentdialog->slotEnableButtons(); // Update lockouts
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
@ -933,6 +1028,8 @@ WirelessSecurityWidgetImpl::slotComboSecurityActivated(int index)
|
|
|
|
|
// should not happen, something is broken...
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (_parentdialog) _parentdialog->slotEnableButtons(); // Update lockouts
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
@ -993,6 +1090,8 @@ WirelessSecurityWidgetImpl::slotExtraSettingsToggled(bool on)
|
|
|
|
|
_mainWid->groupUseEncryption->layout()->remove(*it);
|
|
|
|
|
(*it)->hide();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (_parentdialog) _parentdialog->slotEnableButtons(); // Update lockouts
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|