Commit 764cb342 authored by hexchain's avatar hexchain Committed by Jan Grulich

Support WPA3-SAE in the applet popup

Summary:
Add support for WPA3-SAE in the applet popup:

- The "Security type" field in the connection detail correctly shows WPA3-SAE

- Support QR code generation for WPA3-SAE connections

Depends on D27665

Test Plan:
1. Apply D27665

2. Connect to a WPA3-SAE network and see the "Security type" field in Details

3. Right click on the active connection and choose "Show network's QR code"

Reviewers: jgrulich

Reviewed By: jgrulich

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D27666
parent a53bcb80
......@@ -33,9 +33,9 @@ PlasmaComponents.ListItem {
property bool activating: ConnectionState == PlasmaNM.Enums.Activating
property int baseHeight: Math.max(units.iconSizes.medium, connectionNameLabel.height + connectionStatusLabel.height) + Math.round(units.gridUnit / 2)
property bool expanded: visibleDetails || visiblePasswordDialog
property bool predictableWirelessPassword: !Uuid && Type == PlasmaNM.Enums.Wireless &&
(SecurityType == PlasmaNM.Enums.StaticWep || SecurityType == PlasmaNM.Enums.WpaPsk ||
SecurityType == PlasmaNM.Enums.Wpa2Psk)
property bool passwordIsStatic: (SecurityType == PlasmaNM.Enums.StaticWep || SecurityType == PlasmaNM.Enums.WpaPsk ||
SecurityType == PlasmaNM.Enums.Wpa2Psk || SecurityType == PlasmaNM.Enums.SAE)
property bool predictableWirelessPassword: !Uuid && Type == PlasmaNM.Enums.Wireless && passwordIsStatic
property bool showSpeed: plasmoid.expanded &&
ConnectionState == PlasmaNM.Enums.Activated &&
(Type == PlasmaNM.Enums.Wired ||
......@@ -164,8 +164,7 @@ PlasmaComponents.ListItem {
function prepare() {
showQRMenuItem.visible = false;
if (Uuid && Type === PlasmaNM.Enums.Wireless &&
(SecurityType === PlasmaNM.Enums.StaticWep || SecurityType === PlasmaNM.Enums.WpaPsk || SecurityType === PlasmaNM.Enums.Wpa2Psk)) {
if (Uuid && Type === PlasmaNM.Enums.Wireless && passwordIsStatic) {
if (!showQRComponent) {
showQRComponent = Qt.createComponent("ShowQR.qml", this);
if (showQRComponent.status === Component.Error) {
......
......@@ -69,7 +69,8 @@ public:
WpaPsk,
WpaEap,
Wpa2Psk,
Wpa2Eap
Wpa2Eap,
SAE
};
};
......
......@@ -194,6 +194,9 @@ QString Handler::wifiCode(const QString& connectionPath, const QString& ssid, in
case NetworkManager::Wpa2Psk:
ret += "T:WPA;";
break;
case NetworkManager::SAE:
ret += "T:SAE;";
break;
default:
case NetworkManager::DynamicWep:
case NetworkManager::WpaEap:
......@@ -217,6 +220,7 @@ QString Handler::wifiCode(const QString& connectionPath, const QString& ssid, in
break;
case NetworkManager::WpaPsk:
case NetworkManager::Wpa2Psk:
case NetworkManager::SAE:
pass = secret["psk"].toString();
break;
default:
......
......@@ -615,6 +615,9 @@ QString UiUtils::labelFromWirelessSecurity(NetworkManager::WirelessSecurityType
case NetworkManager::Wpa2Eap:
tip = i18nc("@label WPA2-EAP security", "WPA2-EAP");
break;
case NetworkManager::SAE:
tip = i18nc("@label WPA3-SAE security", "WPA3-SAE");
break;
default:
tip = i18nc("@label unknown security", "Unknown security type");
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment