check pwdflag is change

This commit is contained in:
jzxc95 2021-10-22 11:44:16 +08:00
parent 8c4595ced4
commit 62bcafc227
3 changed files with 21 additions and 12 deletions

View File

@ -38,7 +38,7 @@ public:
&& this->clientCertPath == info.clientCertPath
&& this->clientPrivateKey == info.clientPrivateKey
&& this->clientPrivateKeyPWD == info.clientPrivateKeyPWD
/*&& this->m_privateKeyPWDFlag == info.m_privateKeyPWDFlag*/) {
&& this->m_privateKeyPWDFlag == info.m_privateKeyPWDFlag) {
return true;
} else {
return false;
@ -83,7 +83,7 @@ public:
if (this->phase2AuthMethod == info.phase2AuthMethod
&& this->userName == info.userName
&& this->userPWD == info.userPWD
/*&& this->m_passwdFlag == info.m_passwdFlag*/) {
&& this->m_passwdFlag == info.m_passwdFlag) {
return true;
} else {
return false;
@ -116,7 +116,7 @@ public:
if (this->authEapMethod == info.authEapMethod
&& this ->userName == info.userName
&& this->userPWD == info.userPWD
/*&& this->m_passwdFlag == info.m_passwdFlag*/) {
&& this->m_passwdFlag == info.m_passwdFlag) {
return true;
}
} else {
@ -124,7 +124,7 @@ public:
if (this->authNoEapMethod == info.authNoEapMethod
&& this ->userName == info.userName
&& this->userPWD == info.userPWD
/*&& this->m_passwdFlag == info.m_passwdFlag*/) {
&& this->m_passwdFlag == info.m_passwdFlag) {
return true;
}
}

View File

@ -438,8 +438,17 @@ bool KyWirelessNetResource::getEnterPriseInfoTls(QString &uuid, KyEapMethodTlsIn
info.identity = setting->identity();
info.domain = setting->domainSuffixMatch();
info.caCertPath = setting->caPath();
if (info.caCertPath.left(7) == "file://") {
info.caCertPath = info.caCertPath.mid(7);
}
info.clientCertPath = setting->clientCertificate();
if (info.clientCertPath.left(7) == "file://") {
info.clientCertPath = info.clientCertPath.mid(7);
}
info.clientPrivateKey = QString(setting->privateKey());
if (info.clientPrivateKey.left(7) == "file://") {
info.clientPrivateKey = info.clientPrivateKey.mid(7);
}
info.m_privateKeyPWDFlag = setting->privateKeyPasswordFlags();
if (!info.m_privateKeyPWDFlag) {
info.clientPrivateKeyPWD = m_operation->getPrivateKeyPassword(conn->uuid());

View File

@ -251,7 +251,7 @@ void SecurityPage::setPeapInfo(KyEapMethodPeapInfo &info)
}
userNameEdit->setText(info.userName);
userPwdEdit->setText(info.userPWD);
if (info.m_passwdFlag & NetworkManager::Setting::NotSaved) {
if (info.m_passwdFlag) {
userPwdFlagBox->setChecked(true);
} else {
userPwdFlagBox->setChecked(false);
@ -289,7 +289,7 @@ void SecurityPage::setTtlsInfo(KyEapMethodTtlsInfo &info)
}
userNameEdit->setText(info.userName);
userPwdEdit->setText(info.userPWD);
if (info.m_passwdFlag & NetworkManager::Setting::NotSaved) {
if (info.m_passwdFlag) {
userPwdFlagBox->setChecked(true);
} else {
userPwdFlagBox->setChecked(false);
@ -313,9 +313,9 @@ void SecurityPage::setSecurityVisible(const bool &visible)
void SecurityPage::updateTlsChange(KyEapMethodTlsInfo &info)
{
KyEapMethodTlsInfo tlsInfo = assembleTlsInfo();
// if (tlsInfo.clientPrivateKeyPWD != info.clientPrivateKeyPWD) {
if (tlsInfo.clientPrivateKeyPWD != info.clientPrivateKeyPWD) {
tlsInfo.bChanged = true;
// }
}
tlsInfo.devIfaceName = info.devIfaceName;
info = tlsInfo;
}
@ -323,18 +323,18 @@ void SecurityPage::updateTlsChange(KyEapMethodTlsInfo &info)
void SecurityPage::updatePeapChange(KyEapMethodPeapInfo &info)
{
KyEapMethodPeapInfo peapInfo = assemblePeapInfo();
// if (peapInfo.userPWD != info.userPWD) {
if (peapInfo.userPWD != info.userPWD) {
peapInfo.bChanged = true;
// }
}
info = peapInfo;
}
void SecurityPage::updateTtlsChange(KyEapMethodTtlsInfo &info)
{
KyEapMethodTtlsInfo ttlsInfo = assembleTtlsInfo();
// if (ttlsInfo.userPWD != info.userPWD) {
if (ttlsInfo.userPWD != info.userPWD) {
ttlsInfo.bChanged = true;
// }
}
info = ttlsInfo;
}