add signal

This commit is contained in:
jzxc95 2021-08-25 13:41:50 +08:00
parent 25c3793118
commit 15cb85b512
2 changed files with 18 additions and 16 deletions

View File

@ -365,7 +365,9 @@ void KyWirelessConnectOperation::addAndActiveWirelessConnect(QString & devIface,
NetworkManager::WirelessNetwork::Ptr wifiNet = checkWifiNetExist(connSettingInfo.m_ssid, devIface);
if (!isHidden && wifiNet.isNull()) {
qDebug() << "addAndActiveWirelessConnect can not find " << connSettingInfo.m_ssid << " in " << devIface;
QString errorMessage = "the ssid " + connSettingInfo.m_ssid + " is not exsit in " + devIface;
qWarning()<<errorMessage;
Q_EMIT activateConnectionError(errorMessage);
return;
}
@ -456,7 +458,9 @@ void KyWirelessConnectOperation::addAndActiveWirelessEnterPriseTlsConnect(KyEapM
if (!isHidden) {
NetworkManager::WirelessNetwork::Ptr wifiNet = checkWifiNetExist(connSettingInfo.m_ssid, devIface);
if (wifiNet.isNull()) {
qDebug() << "addAndActiveWirelessEnterPriseTlsConnect can not find " << connSettingInfo.m_ssid << " in " << devIface;
QString errorMessage = "the ssid " + connSettingInfo.m_ssid + " is not exsit in " + devIface;
qWarning()<<errorMessage;
Q_EMIT activateConnectionError(errorMessage);
return;
}
@ -510,7 +514,9 @@ void KyWirelessConnectOperation::addAndActiveWirelessEnterPrisePeapConnect(KyEap
{
NetworkManager::WirelessNetwork::Ptr wifiNet = checkWifiNetExist(connSettingInfo.m_ssid, devIface);
if (wifiNet.isNull()) {
qDebug() << "addAndActiveWirelessEnterPrisePeapConnect can not find " << connSettingInfo.m_ssid << " in " << devIface;
QString errorMessage = "the ssid " + connSettingInfo.m_ssid + " is not exsit in " + devIface;
qWarning()<<errorMessage;
Q_EMIT activateConnectionError(errorMessage);
return;
}
@ -562,7 +568,9 @@ void KyWirelessConnectOperation::addAndActiveWirelessEnterPriseTtlsConnect(KyEap
if (!isHidden) {
NetworkManager::WirelessNetwork::Ptr wifiNet = checkWifiNetExist(connSettingInfo.m_ssid, devIface);
if (wifiNet.isNull()) {
qDebug() << "addAndActiveWirelessEnterPriseTtlsConnect can not find " << connSettingInfo.m_ssid << " in " << devIface;
QString errorMessage = "the ssid " + connSettingInfo.m_ssid + " is not exsit in " + devIface;
qWarning()<<errorMessage;
Q_EMIT activateConnectionError(errorMessage);
return;
}

View File

@ -309,19 +309,13 @@ bool KyWirelessNetResource::getEnterPriseInfoTls(QString &uuid, KyEapMethodTlsIn
return false;
}
QList<NetworkManager::Security8021xSetting::EapMethod> list;
list.append(NetworkManager::Security8021xSetting::EapMethod::EapMethodTls);
setting->setEapMethods(list);
setting->setIdentity(info.identity);
if(!info.domain.isEmpty()) {
setting->setDomainSuffixMatch(info.domain);
}
setting->setCaPath(info.caCertPath);
setting->setClientCertificate(info.clientCertPath.toLocal8Bit());
setting->setPrivateKey(info.clientPrivateKey.toLocal8Bit());
setting->setPrivateKeyPassword(info.clientPrivateKeyPWD);
info.identity = setting->identity();
info.domain = setting->domainSuffixMatch();
conn->update(conn->settings()->toMap());
info.caCertPath = setting->caPath();
info.clientCertPath = setting->clientCertificate();
info.clientPrivateKey = QString(setting->privateKey());
info.clientPrivateKeyPWD = setting->privateKeyPassword();
return true;
}