From 4b3cb3b4cd08057773d1d230ffc121ff561f1c8e Mon Sep 17 00:00:00 2001 From: hupster Date: Tue, 30 Jan 2024 19:30:05 +0100 Subject: [PATCH] wpa3 support --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/network.rs | 6 ++++++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 606c8ea3..8e3b4066 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -407,7 +407,7 @@ dependencies = [ [[package]] name = "network-manager" version = "0.13.3" -source = "git+https://github.com/balena-io-modules/network-manager.git#4da2e6a57de16b6ae911f74321f929d78af8b1ba" +source = "git+https://github.com/hupster/network-manager.git#46e6c38034b4933ec73c5cb5d53220cb2de909b2" dependencies = [ "ascii", "bitflags", diff --git a/Cargo.toml b/Cargo.toml index bbe4d249..33506491 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,7 +5,7 @@ authors = ["Zahari Petkov "] description = "Easy WiFi setup for Linux devices from your mobile phone or laptop" [dependencies] -network-manager = { git = "https://github.com/balena-io-modules/network-manager.git" } +network-manager = { git = "https://github.com/hupster/network-manager.git" } clap = "2.24" iron = "0.6" iron-cors = "0.8" diff --git a/src/network.rs b/src/network.rs index 6e747d5b..39f67549 100644 --- a/src/network.rs +++ b/src/network.rs @@ -280,6 +280,10 @@ fn init_access_point_credentials( identity: identity.to_string(), passphrase: passphrase.to_string(), } + } else if access_point.security.contains(Security::WPA3) { + AccessPointCredentials::Sae { + passphrase: passphrase.to_string(), + } } else if access_point.security.contains(Security::WPA2) || access_point.security.contains(Security::WPA) { @@ -415,6 +419,8 @@ fn get_network_info(access_point: &AccessPoint) -> Network { fn get_network_security(access_point: &AccessPoint) -> &str { if access_point.security.contains(Security::ENTERPRISE) { "enterprise" + } else if access_point.security.contains(Security::WPA3) { + "wpa3" } else if access_point.security.contains(Security::WPA2) || access_point.security.contains(Security::WPA) {