Index: server/site_wlan_connect.py |
diff --git a/server/site_wlan_connect.py b/server/site_wlan_connect.py |
index ed7c2a65d20e5e1c2dc82482642fbf778b7a655b..dadc510a536c8e8475b80da63cf9896879acaaa9 100644 |
--- a/server/site_wlan_connect.py |
+++ b/server/site_wlan_connect.py |
@@ -13,14 +13,22 @@ manager = dbus.Interface(bus.get_object("org.chromium.flimflam", "/"), |
"org.chromium.flimflam.Manager") |
connect_quirks = {} |
+connection_settings = { |
+ "Type": "wifi", |
+ "Mode": "managed", |
+ "SSID": ssid, |
+ "Security": security |
+} |
+ |
+if security == '802_1x': |
+ (connection_settings["Identity"], |
+ connection_settings["CertPath"]) = psk.split(':') |
+else: |
+ connection_settings["Passphrase"] = psk |
+ |
def DbusSetup(): |
try: |
- path = manager.GetService(({ |
- "Type": "wifi", |
- "Mode": "managed", |
- "SSID": ssid, |
- "Security": security, |
- "Passphrase": psk })) |
+ path = manager.GetService((connection_settings)) |
service = dbus.Interface( |
bus.get_object("org.chromium.flimflam", path), |
"org.chromium.flimflam.Service") |