2006-02-25 Robert Love <rml@novell.com>
Add WPA Enterprise support: * gnome/applet/Makefile.am: Build the files nm-gconf-wso-wpa-eap.c and nm-gconf-wso-wpa-eap.h. * gnome/applet/nm-gconf-wso-wpa-eap.c, gnome/applet/nm-gconf-wso-wpa-eap.h: Add WPA Enterprise Gconf serialization and deserialization. * gnome/applet/nm-gconf-wso-wpa-psk.c, gnome/applet/nm-gconf-wso.c, gnome/applet/wireless-security-option.c, gnome/applet/wso-wpa-psk.c, gnome/applet/wso-wpa-psk.h: Clean up, support new defines. * gnome/applet/wireless-applet.glade: Add UI for configurating security settings related to WPA Enterprise. * gnome/applet/wireless-security-manager.c: Invoke wso_wpa_eap_new() to instantiate WPA Enterprise wireless-security-option. * gnome/applet/wso-wpa-eap.c, gnome/applet/wso-wpa-eap.h: New files. Implement WPA Enterprise wireless-security-option object. * include/NetworkManager.h: Add new NM_AUTH_TYPE_* and NM_EAP_METHOD_* defines. Cleanup. * libnm-util/cipher-wpa-psk-hex.c, libnm-util/cipher-wpa-psk-passphrase.c: Cleanup. * libnm-util/dbus-helpers.c, libnm-util/dbus-helpers.h: Add nmu_security_serialize_wpa_eap() to serialize input to DBUS method, nmu_security_serialize_wpa_eap_with_cipher() to serialize input including the cipher to DBUS method, and nmu_security_deserialize_wpa_eap() to deserialize from DBUS return to output. * src/Makefile.am: Build the files nm-ap-security-wpa-eap.c and nm-ap-security-wpa-eap.h * src/NetworkManagerAP.c: Add NM_AUTH_TYPE_WPA_EAP to NM_802_11_CAP_KEY_MGMT_802_1X cipher to capability mapping. * src/nm-ap-security-wpa-eap.c, src/nm-ap-security-wpa-eap.h: New files. Implement NMAPSecurityWPA_EAP object. * src/nm-ap-security-wpa-psk.c: Cleanup. * src/nm-ap-security.c: Support NM_AUTH_TYPE_EAP cipher and instantiate an NMAPSecurityWPA_EAP object via the method nm_ap_security_wpa_eap_new_deserialize(). * src/nm-dbus-nm.c: Cleanup. * test/nm-tool.c: Display "Enterprise" for wireless networks providing WPA Enterprise support. git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1493 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
41
ChangeLog
41
ChangeLog
@@ -1,3 +1,44 @@
|
|||||||
|
2006-02-25 Robert Love <rml@novell.com>
|
||||||
|
|
||||||
|
Add WPA Enterprise support:
|
||||||
|
* gnome/applet/Makefile.am: Build the files nm-gconf-wso-wpa-eap.c and
|
||||||
|
nm-gconf-wso-wpa-eap.h.
|
||||||
|
* gnome/applet/nm-gconf-wso-wpa-eap.c,
|
||||||
|
gnome/applet/nm-gconf-wso-wpa-eap.h: Add WPA Enterprise Gconf
|
||||||
|
serialization and deserialization.
|
||||||
|
* gnome/applet/nm-gconf-wso-wpa-psk.c, gnome/applet/nm-gconf-wso.c,
|
||||||
|
gnome/applet/wireless-security-option.c, gnome/applet/wso-wpa-psk.c,
|
||||||
|
gnome/applet/wso-wpa-psk.h: Clean up, support new defines.
|
||||||
|
* gnome/applet/wireless-applet.glade: Add UI for configurating security
|
||||||
|
settings related to WPA Enterprise.
|
||||||
|
* gnome/applet/wireless-security-manager.c: Invoke wso_wpa_eap_new() to
|
||||||
|
instantiate WPA Enterprise wireless-security-option.
|
||||||
|
* gnome/applet/wso-wpa-eap.c, gnome/applet/wso-wpa-eap.h: New files.
|
||||||
|
Implement WPA Enterprise wireless-security-option object.
|
||||||
|
* include/NetworkManager.h: Add new NM_AUTH_TYPE_* and NM_EAP_METHOD_*
|
||||||
|
defines. Cleanup.
|
||||||
|
* libnm-util/cipher-wpa-psk-hex.c,
|
||||||
|
libnm-util/cipher-wpa-psk-passphrase.c: Cleanup.
|
||||||
|
* libnm-util/dbus-helpers.c, libnm-util/dbus-helpers.h: Add
|
||||||
|
nmu_security_serialize_wpa_eap() to serialize input to DBUS method,
|
||||||
|
nmu_security_serialize_wpa_eap_with_cipher() to serialize input
|
||||||
|
including the cipher to DBUS method, and
|
||||||
|
nmu_security_deserialize_wpa_eap() to deserialize from DBUS return
|
||||||
|
to output.
|
||||||
|
* src/Makefile.am: Build the files nm-ap-security-wpa-eap.c and
|
||||||
|
nm-ap-security-wpa-eap.h
|
||||||
|
* src/NetworkManagerAP.c: Add NM_AUTH_TYPE_WPA_EAP to
|
||||||
|
NM_802_11_CAP_KEY_MGMT_802_1X cipher to capability mapping.
|
||||||
|
* src/nm-ap-security-wpa-eap.c, src/nm-ap-security-wpa-eap.h: New
|
||||||
|
files. Implement NMAPSecurityWPA_EAP object.
|
||||||
|
* src/nm-ap-security-wpa-psk.c: Cleanup.
|
||||||
|
* src/nm-ap-security.c: Support NM_AUTH_TYPE_EAP cipher and instantiate
|
||||||
|
an NMAPSecurityWPA_EAP object via the method
|
||||||
|
nm_ap_security_wpa_eap_new_deserialize().
|
||||||
|
* src/nm-dbus-nm.c: Cleanup.
|
||||||
|
* test/nm-tool.c: Display "Enterprise" for wireless networks providing
|
||||||
|
WPA Enterprise support.
|
||||||
|
|
||||||
2006-02-24 Robert Love <rml@novell.com>
|
2006-02-24 Robert Love <rml@novell.com>
|
||||||
|
|
||||||
Patch from Timo Hoenig <thoenig@suse.de>:
|
Patch from Timo Hoenig <thoenig@suse.de>:
|
||||||
|
@@ -74,6 +74,8 @@ nm_applet_SOURCES = \
|
|||||||
wso-wep-hex.h \
|
wso-wep-hex.h \
|
||||||
wso-wep-passphrase.c \
|
wso-wep-passphrase.c \
|
||||||
wso-wep-passphrase.h \
|
wso-wep-passphrase.h \
|
||||||
|
wso-wpa-eap.c \
|
||||||
|
wso-wpa-eap.h \
|
||||||
wso-wpa-psk.c \
|
wso-wpa-psk.c \
|
||||||
wso-wpa-psk.h \
|
wso-wpa-psk.h \
|
||||||
nm-gconf-wso.c \
|
nm-gconf-wso.c \
|
||||||
@@ -81,6 +83,8 @@ nm_applet_SOURCES = \
|
|||||||
nm-gconf-wso-private.h \
|
nm-gconf-wso-private.h \
|
||||||
nm-gconf-wso-wep.c \
|
nm-gconf-wso-wep.c \
|
||||||
nm-gconf-wso-wep.h \
|
nm-gconf-wso-wep.h \
|
||||||
|
nm-gconf-wso-wpa-eap.c \
|
||||||
|
nm-gconf-wso-wpa-eap.h \
|
||||||
nm-gconf-wso-wpa-psk.c \
|
nm-gconf-wso-wpa-psk.c \
|
||||||
nm-gconf-wso-wpa-psk.h \
|
nm-gconf-wso-wpa-psk.h \
|
||||||
gconf-helpers.c \
|
gconf-helpers.c \
|
||||||
|
@@ -39,8 +39,6 @@ struct _NMGConfWSOWPA_PSKPrivate
|
|||||||
{
|
{
|
||||||
int wpa_version;
|
int wpa_version;
|
||||||
int key_mgt;
|
int key_mgt;
|
||||||
|
|
||||||
gboolean dispose_has_run;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
NMGConfWSOWPA_PSK *
|
NMGConfWSOWPA_PSK *
|
||||||
@@ -53,7 +51,7 @@ nm_gconf_wso_wpa_psk_new_deserialize_dbus (DBusMessageIter *iter, int we_cipher)
|
|||||||
int key_mgt;
|
int key_mgt;
|
||||||
|
|
||||||
g_return_val_if_fail (iter != NULL, NULL);
|
g_return_val_if_fail (iter != NULL, NULL);
|
||||||
g_return_val_if_fail ((we_cipher == NM_AUTH_CIPHER_AUTO || we_cipher == IW_AUTH_CIPHER_TKIP) || (we_cipher == IW_AUTH_CIPHER_CCMP), NULL);
|
g_return_val_if_fail ((we_cipher == NM_AUTH_TYPE_WPA_PSK_AUTO || we_cipher == IW_AUTH_CIPHER_TKIP) || (we_cipher == IW_AUTH_CIPHER_CCMP), NULL);
|
||||||
|
|
||||||
if (!nmu_security_deserialize_wpa_psk (iter, &key, &key_len, &wpa_version, &key_mgt))
|
if (!nmu_security_deserialize_wpa_psk (iter, &key, &key_len, &wpa_version, &key_mgt))
|
||||||
goto out;
|
goto out;
|
||||||
@@ -65,6 +63,8 @@ nm_gconf_wso_wpa_psk_new_deserialize_dbus (DBusMessageIter *iter, int we_cipher)
|
|||||||
security->priv->wpa_version = wpa_version;
|
security->priv->wpa_version = wpa_version;
|
||||||
security->priv->key_mgt = key_mgt;
|
security->priv->key_mgt = key_mgt;
|
||||||
|
|
||||||
|
/* FIXME: Need to free 'key' ? */
|
||||||
|
|
||||||
out:
|
out:
|
||||||
return security;
|
return security;
|
||||||
}
|
}
|
||||||
@@ -73,12 +73,12 @@ NMGConfWSOWPA_PSK *
|
|||||||
nm_gconf_wso_wpa_psk_new_deserialize_gconf (GConfClient *client, const char *network, int we_cipher)
|
nm_gconf_wso_wpa_psk_new_deserialize_gconf (GConfClient *client, const char *network, int we_cipher)
|
||||||
{
|
{
|
||||||
NMGConfWSOWPA_PSK * security = NULL;
|
NMGConfWSOWPA_PSK * security = NULL;
|
||||||
int wpa_version;
|
int wpa_version;
|
||||||
int key_mgt;
|
int key_mgt;
|
||||||
|
|
||||||
g_return_val_if_fail (client != NULL, NULL);
|
g_return_val_if_fail (client != NULL, NULL);
|
||||||
g_return_val_if_fail (network != NULL, NULL);
|
g_return_val_if_fail (network != NULL, NULL);
|
||||||
g_return_val_if_fail ((we_cipher == NM_AUTH_CIPHER_AUTO || we_cipher == IW_AUTH_CIPHER_TKIP) || (we_cipher == IW_AUTH_CIPHER_CCMP), NULL);
|
g_return_val_if_fail ((we_cipher == NM_AUTH_TYPE_WPA_PSK_AUTO || we_cipher == IW_AUTH_CIPHER_TKIP) || (we_cipher == IW_AUTH_CIPHER_CCMP), NULL);
|
||||||
|
|
||||||
if (!nm_gconf_get_int_helper (client,
|
if (!nm_gconf_get_int_helper (client,
|
||||||
GCONF_PATH_WIRELESS_NETWORKS,
|
GCONF_PATH_WIRELESS_NETWORKS,
|
||||||
@@ -140,7 +140,6 @@ nm_gconf_wso_wpa_psk_init (NMGConfWSOWPA_PSK * self)
|
|||||||
self->priv = NM_GCONF_WSO_WPA_PSK_GET_PRIVATE (self);
|
self->priv = NM_GCONF_WSO_WPA_PSK_GET_PRIVATE (self);
|
||||||
self->priv->wpa_version = IW_AUTH_WPA_VERSION_WPA;
|
self->priv->wpa_version = IW_AUTH_WPA_VERSION_WPA;
|
||||||
self->priv->key_mgt = IW_AUTH_KEY_MGMT_PSK;
|
self->priv->key_mgt = IW_AUTH_KEY_MGMT_PSK;
|
||||||
self->priv->dispose_has_run = FALSE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@@ -29,6 +29,7 @@
|
|||||||
#include "nm-gconf-wso.h"
|
#include "nm-gconf-wso.h"
|
||||||
#include "nm-gconf-wso-private.h"
|
#include "nm-gconf-wso-private.h"
|
||||||
#include "nm-gconf-wso-wep.h"
|
#include "nm-gconf-wso-wep.h"
|
||||||
|
#include "nm-gconf-wso-wpa-eap.h"
|
||||||
#include "nm-gconf-wso-wpa-psk.h"
|
#include "nm-gconf-wso-wpa-psk.h"
|
||||||
#include "gconf-helpers.h"
|
#include "gconf-helpers.h"
|
||||||
#include "wireless-security-option.h"
|
#include "wireless-security-option.h"
|
||||||
@@ -84,12 +85,16 @@ nm_gconf_wso_new_deserialize_dbus (DBusMessageIter *iter)
|
|||||||
security = NM_GCONF_WSO (nm_gconf_wso_wep_new_deserialize_dbus (iter, we_cipher));
|
security = NM_GCONF_WSO (nm_gconf_wso_wep_new_deserialize_dbus (iter, we_cipher));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case NM_AUTH_CIPHER_AUTO:
|
case NM_AUTH_TYPE_WPA_PSK_AUTO:
|
||||||
case IW_AUTH_CIPHER_TKIP:
|
case IW_AUTH_CIPHER_TKIP:
|
||||||
case IW_AUTH_CIPHER_CCMP:
|
case IW_AUTH_CIPHER_CCMP:
|
||||||
security = NM_GCONF_WSO (nm_gconf_wso_wpa_psk_new_deserialize_dbus (iter, we_cipher));
|
security = NM_GCONF_WSO (nm_gconf_wso_wpa_psk_new_deserialize_dbus (iter, we_cipher));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case NM_AUTH_TYPE_WPA_EAP:
|
||||||
|
security = NM_GCONF_WSO (nm_gconf_wso_wpa_eap_new_deserialize_dbus (iter, we_cipher));
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -126,7 +131,7 @@ nm_gconf_wso_new_deserialize_gconf (GConfClient *client,
|
|||||||
security = NM_GCONF_WSO (nm_gconf_wso_wep_new_deserialize_gconf (client, network, we_cipher));
|
security = NM_GCONF_WSO (nm_gconf_wso_wep_new_deserialize_gconf (client, network, we_cipher));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case NM_AUTH_CIPHER_AUTO:
|
case NM_AUTH_TYPE_WPA_PSK_AUTO:
|
||||||
case IW_AUTH_CIPHER_TKIP:
|
case IW_AUTH_CIPHER_TKIP:
|
||||||
case IW_AUTH_CIPHER_CCMP:
|
case IW_AUTH_CIPHER_CCMP:
|
||||||
security = NM_GCONF_WSO (nm_gconf_wso_wpa_psk_new_deserialize_gconf (client, network, we_cipher));
|
security = NM_GCONF_WSO (nm_gconf_wso_wpa_psk_new_deserialize_gconf (client, network, we_cipher));
|
||||||
@@ -176,7 +181,8 @@ nm_gconf_wso_set_we_cipher (NMGConfWSO *self,
|
|||||||
|
|
||||||
/* Ensure the cipher is valid */
|
/* Ensure the cipher is valid */
|
||||||
g_return_if_fail (
|
g_return_if_fail (
|
||||||
(we_cipher == NM_AUTH_CIPHER_AUTO)
|
(we_cipher == NM_AUTH_TYPE_WPA_PSK_AUTO)
|
||||||
|
|| (we_cipher == NM_AUTH_TYPE_WPA_EAP)
|
||||||
|| (we_cipher == IW_AUTH_CIPHER_NONE)
|
|| (we_cipher == IW_AUTH_CIPHER_NONE)
|
||||||
|| (we_cipher == IW_AUTH_CIPHER_WEP40)
|
|| (we_cipher == IW_AUTH_CIPHER_WEP40)
|
||||||
|| (we_cipher == IW_AUTH_CIPHER_WEP104)
|
|| (we_cipher == IW_AUTH_CIPHER_WEP104)
|
||||||
|
@@ -1704,7 +1704,7 @@ WEP 40/128-bit ASCII
|
|||||||
<property name="label" translatable="yes">Key:</property>
|
<property name="label" translatable="yes">Key:</property>
|
||||||
<property name="use_underline">False</property>
|
<property name="use_underline">False</property>
|
||||||
<property name="use_markup">False</property>
|
<property name="use_markup">False</property>
|
||||||
<property name="justify">GTK_JUSTIFY_RIGHT</property>
|
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||||
<property name="wrap">False</property>
|
<property name="wrap">False</property>
|
||||||
<property name="selectable">False</property>
|
<property name="selectable">False</property>
|
||||||
<property name="xalign">1</property>
|
<property name="xalign">1</property>
|
||||||
@@ -1935,7 +1935,7 @@ Shared Key</property>
|
|||||||
<property name="label" translatable="yes">User Name:</property>
|
<property name="label" translatable="yes">User Name:</property>
|
||||||
<property name="use_underline">False</property>
|
<property name="use_underline">False</property>
|
||||||
<property name="use_markup">False</property>
|
<property name="use_markup">False</property>
|
||||||
<property name="justify">GTK_JUSTIFY_RIGHT</property>
|
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||||
<property name="wrap">False</property>
|
<property name="wrap">False</property>
|
||||||
<property name="selectable">False</property>
|
<property name="selectable">False</property>
|
||||||
<property name="xalign">1</property>
|
<property name="xalign">1</property>
|
||||||
@@ -1963,7 +1963,7 @@ Shared Key</property>
|
|||||||
<property name="label" translatable="yes">Password:</property>
|
<property name="label" translatable="yes">Password:</property>
|
||||||
<property name="use_underline">False</property>
|
<property name="use_underline">False</property>
|
||||||
<property name="use_markup">False</property>
|
<property name="use_markup">False</property>
|
||||||
<property name="justify">GTK_JUSTIFY_RIGHT</property>
|
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||||
<property name="wrap">False</property>
|
<property name="wrap">False</property>
|
||||||
<property name="selectable">False</property>
|
<property name="selectable">False</property>
|
||||||
<property name="xalign">1</property>
|
<property name="xalign">1</property>
|
||||||
@@ -2070,7 +2070,7 @@ Shared Key</property>
|
|||||||
<property name="enable_popup">False</property>
|
<property name="enable_popup">False</property>
|
||||||
|
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkTable" id="table8">
|
<widget class="GtkTable" id="wpa_psk_table">
|
||||||
<property name="border_width">8</property>
|
<property name="border_width">8</property>
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="n_rows">2</property>
|
<property name="n_rows">2</property>
|
||||||
@@ -2232,6 +2232,484 @@ Shared Key</property>
|
|||||||
</child>
|
</child>
|
||||||
</widget>
|
</widget>
|
||||||
|
|
||||||
|
<widget class="GtkWindow" id="wpa_eap_subwindow">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="title" translatable="yes">wpa_eap_subwindow</property>
|
||||||
|
<property name="type">GTK_WINDOW_TOPLEVEL</property>
|
||||||
|
<property name="window_position">GTK_WIN_POS_NONE</property>
|
||||||
|
<property name="modal">False</property>
|
||||||
|
<property name="resizable">True</property>
|
||||||
|
<property name="destroy_with_parent">False</property>
|
||||||
|
<property name="decorated">True</property>
|
||||||
|
<property name="skip_taskbar_hint">False</property>
|
||||||
|
<property name="skip_pager_hint">False</property>
|
||||||
|
<property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
|
||||||
|
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
|
||||||
|
<property name="focus_on_map">True</property>
|
||||||
|
<property name="urgency_hint">False</property>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkNotebook" id="wpa_eap_notebook">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="show_tabs">False</property>
|
||||||
|
<property name="show_border">False</property>
|
||||||
|
<property name="tab_pos">GTK_POS_TOP</property>
|
||||||
|
<property name="scrollable">False</property>
|
||||||
|
<property name="enable_popup">False</property>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkTable" id="wpa_eap_table">
|
||||||
|
<property name="border_width">8</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="n_rows">8</property>
|
||||||
|
<property name="n_columns">2</property>
|
||||||
|
<property name="homogeneous">False</property>
|
||||||
|
<property name="row_spacing">4</property>
|
||||||
|
<property name="column_spacing">4</property>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkLabel" id="wpa-eap-ca-cert-file-label">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="label" translatable="yes">CA Certificate File:</property>
|
||||||
|
<property name="use_underline">False</property>
|
||||||
|
<property name="use_markup">False</property>
|
||||||
|
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||||
|
<property name="wrap">False</property>
|
||||||
|
<property name="selectable">False</property>
|
||||||
|
<property name="xalign">0</property>
|
||||||
|
<property name="yalign">0.5</property>
|
||||||
|
<property name="xpad">0</property>
|
||||||
|
<property name="ypad">0</property>
|
||||||
|
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||||
|
<property name="width_chars">-1</property>
|
||||||
|
<property name="single_line_mode">False</property>
|
||||||
|
<property name="angle">0</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">0</property>
|
||||||
|
<property name="right_attach">1</property>
|
||||||
|
<property name="top_attach">5</property>
|
||||||
|
<property name="bottom_attach">6</property>
|
||||||
|
<property name="x_options">fill</property>
|
||||||
|
<property name="y_options"></property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkLabel" id="wpa-eap-private-key-file-label">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="label" translatable="yes">Private Key File:</property>
|
||||||
|
<property name="use_underline">False</property>
|
||||||
|
<property name="use_markup">False</property>
|
||||||
|
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||||
|
<property name="wrap">False</property>
|
||||||
|
<property name="selectable">False</property>
|
||||||
|
<property name="xalign">0</property>
|
||||||
|
<property name="yalign">0.5</property>
|
||||||
|
<property name="xpad">0</property>
|
||||||
|
<property name="ypad">0</property>
|
||||||
|
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||||
|
<property name="width_chars">-1</property>
|
||||||
|
<property name="single_line_mode">False</property>
|
||||||
|
<property name="angle">0</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">0</property>
|
||||||
|
<property name="right_attach">1</property>
|
||||||
|
<property name="top_attach">6</property>
|
||||||
|
<property name="bottom_attach">7</property>
|
||||||
|
<property name="x_options">fill</property>
|
||||||
|
<property name="y_options"></property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkFileChooserButton" id="wpa_eap_ca_cert_file_chooser_button">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="title" translatable="yes">Select the CA Certificate File</property>
|
||||||
|
<property name="action">GTK_FILE_CHOOSER_ACTION_OPEN</property>
|
||||||
|
<property name="local_only">True</property>
|
||||||
|
<property name="show_hidden">False</property>
|
||||||
|
<property name="do_overwrite_confirmation">False</property>
|
||||||
|
<property name="width_chars">-1</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">1</property>
|
||||||
|
<property name="right_attach">2</property>
|
||||||
|
<property name="top_attach">5</property>
|
||||||
|
<property name="bottom_attach">6</property>
|
||||||
|
<property name="x_options">fill</property>
|
||||||
|
<property name="y_options">fill</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkFileChooserButton" id="wpa_eap_private_key_file_chooser_button">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="title" translatable="yes">Select the Private Key File</property>
|
||||||
|
<property name="action">GTK_FILE_CHOOSER_ACTION_OPEN</property>
|
||||||
|
<property name="local_only">True</property>
|
||||||
|
<property name="show_hidden">False</property>
|
||||||
|
<property name="do_overwrite_confirmation">False</property>
|
||||||
|
<property name="width_chars">-1</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">1</property>
|
||||||
|
<property name="right_attach">2</property>
|
||||||
|
<property name="top_attach">6</property>
|
||||||
|
<property name="bottom_attach">7</property>
|
||||||
|
<property name="x_options">fill</property>
|
||||||
|
<property name="y_options">fill</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkLabel" id="wpa-eap-private-key-passwd-label">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="label" translatable="yes">Private Key Password:</property>
|
||||||
|
<property name="use_underline">False</property>
|
||||||
|
<property name="use_markup">False</property>
|
||||||
|
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||||
|
<property name="wrap">False</property>
|
||||||
|
<property name="selectable">False</property>
|
||||||
|
<property name="xalign">0</property>
|
||||||
|
<property name="yalign">0.5</property>
|
||||||
|
<property name="xpad">0</property>
|
||||||
|
<property name="ypad">0</property>
|
||||||
|
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||||
|
<property name="width_chars">-1</property>
|
||||||
|
<property name="single_line_mode">False</property>
|
||||||
|
<property name="angle">0</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">0</property>
|
||||||
|
<property name="right_attach">1</property>
|
||||||
|
<property name="top_attach">7</property>
|
||||||
|
<property name="bottom_attach">8</property>
|
||||||
|
<property name="x_options">fill</property>
|
||||||
|
<property name="y_options"></property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkEntry" id="wpa_eap_private_key_passwd_entry">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="editable">True</property>
|
||||||
|
<property name="visibility">True</property>
|
||||||
|
<property name="max_length">0</property>
|
||||||
|
<property name="text" translatable="yes"></property>
|
||||||
|
<property name="has_frame">True</property>
|
||||||
|
<property name="invisible_char">*</property>
|
||||||
|
<property name="activates_default">False</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">1</property>
|
||||||
|
<property name="right_attach">2</property>
|
||||||
|
<property name="top_attach">7</property>
|
||||||
|
<property name="bottom_attach">8</property>
|
||||||
|
<property name="y_options"></property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkLabel" id="wpa-eap-client-cert-file-label">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="label" translatable="yes">Client Certificate File:</property>
|
||||||
|
<property name="use_underline">False</property>
|
||||||
|
<property name="use_markup">False</property>
|
||||||
|
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||||
|
<property name="wrap">False</property>
|
||||||
|
<property name="selectable">False</property>
|
||||||
|
<property name="xalign">0</property>
|
||||||
|
<property name="yalign">0.5</property>
|
||||||
|
<property name="xpad">0</property>
|
||||||
|
<property name="ypad">0</property>
|
||||||
|
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||||
|
<property name="width_chars">-1</property>
|
||||||
|
<property name="single_line_mode">False</property>
|
||||||
|
<property name="angle">0</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">0</property>
|
||||||
|
<property name="right_attach">1</property>
|
||||||
|
<property name="top_attach">4</property>
|
||||||
|
<property name="bottom_attach">5</property>
|
||||||
|
<property name="x_options">fill</property>
|
||||||
|
<property name="y_options"></property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkFileChooserButton" id="wpa_eap_client_cert_file_chooser_button">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="title" translatable="yes">Select the Client Certificate File</property>
|
||||||
|
<property name="action">GTK_FILE_CHOOSER_ACTION_OPEN</property>
|
||||||
|
<property name="local_only">True</property>
|
||||||
|
<property name="show_hidden">False</property>
|
||||||
|
<property name="do_overwrite_confirmation">False</property>
|
||||||
|
<property name="width_chars">-1</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">1</property>
|
||||||
|
<property name="right_attach">2</property>
|
||||||
|
<property name="top_attach">4</property>
|
||||||
|
<property name="bottom_attach">5</property>
|
||||||
|
<property name="x_options">fill</property>
|
||||||
|
<property name="y_options">fill</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkLabel" id="wpa-eap-identity-label">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="label" translatable="yes">Identity:</property>
|
||||||
|
<property name="use_underline">False</property>
|
||||||
|
<property name="use_markup">False</property>
|
||||||
|
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||||
|
<property name="wrap">False</property>
|
||||||
|
<property name="selectable">False</property>
|
||||||
|
<property name="xalign">0</property>
|
||||||
|
<property name="yalign">0.5</property>
|
||||||
|
<property name="xpad">0</property>
|
||||||
|
<property name="ypad">0</property>
|
||||||
|
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||||
|
<property name="width_chars">-1</property>
|
||||||
|
<property name="single_line_mode">False</property>
|
||||||
|
<property name="angle">0</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">0</property>
|
||||||
|
<property name="right_attach">1</property>
|
||||||
|
<property name="top_attach">1</property>
|
||||||
|
<property name="bottom_attach">2</property>
|
||||||
|
<property name="x_options">fill</property>
|
||||||
|
<property name="y_options"></property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkLabel" id="wpa-eap-password-label">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="label" translatable="yes">Password:</property>
|
||||||
|
<property name="use_underline">False</property>
|
||||||
|
<property name="use_markup">False</property>
|
||||||
|
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||||
|
<property name="wrap">False</property>
|
||||||
|
<property name="selectable">False</property>
|
||||||
|
<property name="xalign">0</property>
|
||||||
|
<property name="yalign">0.5</property>
|
||||||
|
<property name="xpad">0</property>
|
||||||
|
<property name="ypad">0</property>
|
||||||
|
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||||
|
<property name="width_chars">-1</property>
|
||||||
|
<property name="single_line_mode">False</property>
|
||||||
|
<property name="angle">0</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">0</property>
|
||||||
|
<property name="right_attach">1</property>
|
||||||
|
<property name="top_attach">2</property>
|
||||||
|
<property name="bottom_attach">3</property>
|
||||||
|
<property name="x_options">fill</property>
|
||||||
|
<property name="y_options"></property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkLabel" id="wpa-eap-anon-identity-label">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="label" translatable="yes">Anonymous Identity:</property>
|
||||||
|
<property name="use_underline">False</property>
|
||||||
|
<property name="use_markup">False</property>
|
||||||
|
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||||
|
<property name="wrap">False</property>
|
||||||
|
<property name="selectable">False</property>
|
||||||
|
<property name="xalign">0</property>
|
||||||
|
<property name="yalign">0.5</property>
|
||||||
|
<property name="xpad">0</property>
|
||||||
|
<property name="ypad">0</property>
|
||||||
|
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||||
|
<property name="width_chars">-1</property>
|
||||||
|
<property name="single_line_mode">False</property>
|
||||||
|
<property name="angle">0</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">0</property>
|
||||||
|
<property name="right_attach">1</property>
|
||||||
|
<property name="top_attach">3</property>
|
||||||
|
<property name="bottom_attach">4</property>
|
||||||
|
<property name="x_options">fill</property>
|
||||||
|
<property name="y_options"></property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkEntry" id="wpa_eap_identity_entry">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="editable">True</property>
|
||||||
|
<property name="visibility">True</property>
|
||||||
|
<property name="max_length">0</property>
|
||||||
|
<property name="text" translatable="yes"></property>
|
||||||
|
<property name="has_frame">True</property>
|
||||||
|
<property name="invisible_char">*</property>
|
||||||
|
<property name="activates_default">False</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">1</property>
|
||||||
|
<property name="right_attach">2</property>
|
||||||
|
<property name="top_attach">1</property>
|
||||||
|
<property name="bottom_attach">2</property>
|
||||||
|
<property name="y_options"></property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkEntry" id="wpa_eap_passwd_entry">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="editable">True</property>
|
||||||
|
<property name="visibility">True</property>
|
||||||
|
<property name="max_length">0</property>
|
||||||
|
<property name="text" translatable="yes"></property>
|
||||||
|
<property name="has_frame">True</property>
|
||||||
|
<property name="invisible_char">*</property>
|
||||||
|
<property name="activates_default">False</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">1</property>
|
||||||
|
<property name="right_attach">2</property>
|
||||||
|
<property name="top_attach">2</property>
|
||||||
|
<property name="bottom_attach">3</property>
|
||||||
|
<property name="y_options"></property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkEntry" id="wpa_eap_anon_identity_entry">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="editable">True</property>
|
||||||
|
<property name="visibility">True</property>
|
||||||
|
<property name="max_length">0</property>
|
||||||
|
<property name="text" translatable="yes"></property>
|
||||||
|
<property name="has_frame">True</property>
|
||||||
|
<property name="invisible_char">*</property>
|
||||||
|
<property name="activates_default">False</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">1</property>
|
||||||
|
<property name="right_attach">2</property>
|
||||||
|
<property name="top_attach">3</property>
|
||||||
|
<property name="bottom_attach">4</property>
|
||||||
|
<property name="y_options"></property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkLabel" id="wpa-eap-method-label">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="label" translatable="yes">EAP Method:</property>
|
||||||
|
<property name="use_underline">False</property>
|
||||||
|
<property name="use_markup">False</property>
|
||||||
|
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||||
|
<property name="wrap">False</property>
|
||||||
|
<property name="selectable">False</property>
|
||||||
|
<property name="xalign">0</property>
|
||||||
|
<property name="yalign">0.5</property>
|
||||||
|
<property name="xpad">0</property>
|
||||||
|
<property name="ypad">0</property>
|
||||||
|
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||||
|
<property name="width_chars">-1</property>
|
||||||
|
<property name="single_line_mode">False</property>
|
||||||
|
<property name="angle">0</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">0</property>
|
||||||
|
<property name="right_attach">1</property>
|
||||||
|
<property name="top_attach">0</property>
|
||||||
|
<property name="bottom_attach">1</property>
|
||||||
|
<property name="x_options">fill</property>
|
||||||
|
<property name="y_options"></property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkComboBox" id="wpa_eap_eap_method_combo">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="add_tearoffs">False</property>
|
||||||
|
<property name="focus_on_click">True</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">1</property>
|
||||||
|
<property name="right_attach">2</property>
|
||||||
|
<property name="top_attach">0</property>
|
||||||
|
<property name="bottom_attach">1</property>
|
||||||
|
<property name="x_options">fill</property>
|
||||||
|
<property name="y_options">fill</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="tab_expand">False</property>
|
||||||
|
<property name="tab_fill">True</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkLabel" id="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="label" translatable="yes"></property>
|
||||||
|
<property name="use_underline">False</property>
|
||||||
|
<property name="use_markup">False</property>
|
||||||
|
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||||
|
<property name="wrap">False</property>
|
||||||
|
<property name="selectable">False</property>
|
||||||
|
<property name="xalign">0.5</property>
|
||||||
|
<property name="yalign">0.5</property>
|
||||||
|
<property name="xpad">0</property>
|
||||||
|
<property name="ypad">0</property>
|
||||||
|
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||||
|
<property name="width_chars">-1</property>
|
||||||
|
<property name="single_line_mode">False</property>
|
||||||
|
<property name="angle">0</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="type">tab</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<placeholder/>
|
||||||
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkLabel" id="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="label" translatable="yes"></property>
|
||||||
|
<property name="use_underline">False</property>
|
||||||
|
<property name="use_markup">False</property>
|
||||||
|
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||||
|
<property name="wrap">False</property>
|
||||||
|
<property name="selectable">False</property>
|
||||||
|
<property name="xalign">0.5</property>
|
||||||
|
<property name="yalign">0.5</property>
|
||||||
|
<property name="xpad">0</property>
|
||||||
|
<property name="ypad">0</property>
|
||||||
|
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||||
|
<property name="width_chars">-1</property>
|
||||||
|
<property name="single_line_mode">False</property>
|
||||||
|
<property name="angle">0</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="type">tab</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
|
||||||
<widget class="GtkWindow" id="wep_passphrase_subwindow">
|
<widget class="GtkWindow" id="wep_passphrase_subwindow">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="title" translatable="yes">wep_passphrase_subwindow</property>
|
<property name="title" translatable="yes">wep_passphrase_subwindow</property>
|
||||||
@@ -2273,7 +2751,7 @@ Shared Key</property>
|
|||||||
<property name="label" translatable="yes">Passphrase:</property>
|
<property name="label" translatable="yes">Passphrase:</property>
|
||||||
<property name="use_underline">False</property>
|
<property name="use_underline">False</property>
|
||||||
<property name="use_markup">False</property>
|
<property name="use_markup">False</property>
|
||||||
<property name="justify">GTK_JUSTIFY_RIGHT</property>
|
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||||
<property name="wrap">False</property>
|
<property name="wrap">False</property>
|
||||||
<property name="selectable">False</property>
|
<property name="selectable">False</property>
|
||||||
<property name="xalign">1</property>
|
<property name="xalign">1</property>
|
||||||
|
@@ -34,6 +34,7 @@
|
|||||||
#include "wso-wep-ascii.h"
|
#include "wso-wep-ascii.h"
|
||||||
#include "wso-wep-hex.h"
|
#include "wso-wep-hex.h"
|
||||||
#include "wso-wep-passphrase.h"
|
#include "wso-wep-passphrase.h"
|
||||||
|
#include "wso-wpa-eap.h"
|
||||||
#include "wso-wpa-psk.h"
|
#include "wso-wpa-psk.h"
|
||||||
|
|
||||||
struct WirelessSecurityManager
|
struct WirelessSecurityManager
|
||||||
@@ -89,14 +90,30 @@ gboolean wsm_set_capabilities (WirelessSecurityManager *wsm, guint32 capabilitie
|
|||||||
|
|
||||||
if (capabilities & NM_802_11_CAP_PROTO_WPA)
|
if (capabilities & NM_802_11_CAP_PROTO_WPA)
|
||||||
{
|
{
|
||||||
if ((opt = wso_wpa_psk_new (wsm->glade_file, capabilities, FALSE)))
|
if (capabilities & NM_802_11_CAP_KEY_MGMT_802_1X)
|
||||||
wsm->options = g_slist_append (wsm->options, opt);
|
{
|
||||||
|
if ((opt = wso_wpa_eap_new (wsm->glade_file, capabilities, FALSE)))
|
||||||
|
wsm->options = g_slist_append (wsm->options, opt);
|
||||||
|
}
|
||||||
|
if (capabilities & NM_802_11_CAP_KEY_MGMT_PSK)
|
||||||
|
{
|
||||||
|
if ((opt = wso_wpa_psk_new (wsm->glade_file, capabilities, FALSE)))
|
||||||
|
wsm->options = g_slist_append (wsm->options, opt);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (capabilities & NM_802_11_CAP_PROTO_WPA2)
|
if (capabilities & NM_802_11_CAP_PROTO_WPA2)
|
||||||
{
|
{
|
||||||
if ((opt = wso_wpa_psk_new (wsm->glade_file, capabilities, TRUE)))
|
if (capabilities & NM_802_11_CAP_KEY_MGMT_802_1X)
|
||||||
wsm->options = g_slist_append (wsm->options, opt);
|
{
|
||||||
|
if ((opt = wso_wpa_eap_new (wsm->glade_file, capabilities, TRUE)))
|
||||||
|
wsm->options = g_slist_append (wsm->options, opt);
|
||||||
|
}
|
||||||
|
if (capabilities & NM_802_11_CAP_KEY_MGMT_PSK)
|
||||||
|
{
|
||||||
|
if ((opt = wso_wpa_psk_new (wsm->glade_file, capabilities, TRUE)))
|
||||||
|
wsm->options = g_slist_append (wsm->options, opt);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!wsm->options)
|
if (!wsm->options)
|
||||||
|
@@ -199,7 +199,7 @@ wso_wpa_create_key_type_model (int capabilities,
|
|||||||
{
|
{
|
||||||
GtkListStore * model;
|
GtkListStore * model;
|
||||||
GtkTreeIter iter;
|
GtkTreeIter iter;
|
||||||
int num = 0;
|
int num = 1;
|
||||||
const char * name;
|
const char * name;
|
||||||
|
|
||||||
g_return_val_if_fail (num_added != NULL, NULL);
|
g_return_val_if_fail (num_added != NULL, NULL);
|
||||||
@@ -210,7 +210,6 @@ wso_wpa_create_key_type_model (int capabilities,
|
|||||||
gtk_list_store_append (model, &iter);
|
gtk_list_store_append (model, &iter);
|
||||||
gtk_list_store_set (model, &iter, WPA_KEY_TYPE_NAME_COL, name,
|
gtk_list_store_set (model, &iter, WPA_KEY_TYPE_NAME_COL, name,
|
||||||
WPA_KEY_TYPE_CIPHER_COL, 0, -1);
|
WPA_KEY_TYPE_CIPHER_COL, 0, -1);
|
||||||
num++;
|
|
||||||
|
|
||||||
if (capabilities & NM_802_11_CAP_CIPHER_TKIP)
|
if (capabilities & NM_802_11_CAP_CIPHER_TKIP)
|
||||||
{
|
{
|
||||||
|
@@ -38,9 +38,9 @@
|
|||||||
|
|
||||||
struct OptData
|
struct OptData
|
||||||
{
|
{
|
||||||
gboolean wpa2;
|
gboolean wpa2;
|
||||||
const char * entry_name;
|
const char * entry_name;
|
||||||
const char * key_type_combo_name;
|
const char * key_type_combo_name;
|
||||||
IEEE_802_11_Cipher * hex_cipher;
|
IEEE_802_11_Cipher * hex_cipher;
|
||||||
IEEE_802_11_Cipher * passphrase_cipher;
|
IEEE_802_11_Cipher * passphrase_cipher;
|
||||||
};
|
};
|
||||||
@@ -127,15 +127,13 @@ key_type_combo_changed_cb (GtkComboBox *combo,
|
|||||||
int we_cipher;
|
int we_cipher;
|
||||||
GtkTreeModel * model;
|
GtkTreeModel * model;
|
||||||
GtkTreeIter iter;
|
GtkTreeIter iter;
|
||||||
char * str;
|
|
||||||
GSList * elt;
|
GSList * elt;
|
||||||
|
|
||||||
g_return_if_fail (opt != NULL);
|
g_return_if_fail (opt != NULL);
|
||||||
|
|
||||||
model = gtk_combo_box_get_model (combo);
|
model = gtk_combo_box_get_model (combo);
|
||||||
gtk_combo_box_get_active_iter (combo, &iter);
|
gtk_combo_box_get_active_iter (combo, &iter);
|
||||||
gtk_tree_model_get (model, &iter, WPA_KEY_TYPE_NAME_COL, &str,
|
gtk_tree_model_get (model, &iter, WPA_KEY_TYPE_CIPHER_COL, &we_cipher, -1);
|
||||||
WPA_KEY_TYPE_CIPHER_COL, &we_cipher, -1);
|
|
||||||
|
|
||||||
for (elt = opt->ciphers; elt; elt = g_slist_next (elt))
|
for (elt = opt->ciphers; elt; elt = g_slist_next (elt))
|
||||||
{
|
{
|
||||||
|
@@ -25,4 +25,4 @@
|
|||||||
WirelessSecurityOption * wso_wpa_psk_new (const char *glade_file, int capabilities, gboolean wpa2);
|
WirelessSecurityOption * wso_wpa_psk_new (const char *glade_file, int capabilities, gboolean wpa2);
|
||||||
|
|
||||||
|
|
||||||
#endif /* WSO_WPA_PSK_HEX_H */
|
#endif /* WSO_WPA_PSK_H */
|
||||||
|
@@ -54,7 +54,7 @@
|
|||||||
/*
|
/*
|
||||||
* NetworkManager signals
|
* NetworkManager signals
|
||||||
*/
|
*/
|
||||||
#define NM_DBUS_SIGNAL_STATE_CHANGE "StateChange"
|
#define NM_DBUS_SIGNAL_STATE_CHANGE "StateChange"
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -92,26 +92,45 @@ typedef enum NMDeviceType
|
|||||||
|
|
||||||
|
|
||||||
/* 802.11 wireless-specific device capability bits */
|
/* 802.11 wireless-specific device capability bits */
|
||||||
#define NM_802_11_CAP_NONE 0x00000000
|
#define NM_802_11_CAP_NONE 0x00000000
|
||||||
#define NM_802_11_CAP_PROTO_NONE 0x00000001
|
#define NM_802_11_CAP_PROTO_NONE 0x00000001
|
||||||
#define NM_802_11_CAP_PROTO_WEP 0x00000002
|
#define NM_802_11_CAP_PROTO_WEP 0x00000002
|
||||||
#define NM_802_11_CAP_PROTO_WPA 0x00000004
|
#define NM_802_11_CAP_PROTO_WPA 0x00000004
|
||||||
#define NM_802_11_CAP_PROTO_WPA2 0x00000008
|
#define NM_802_11_CAP_PROTO_WPA2 0x00000008
|
||||||
#define NM_802_11_CAP_RESERVED1 0x00000010
|
#define NM_802_11_CAP_RESERVED1 0x00000010
|
||||||
#define NM_802_11_CAP_RESERVED2 0x00000020
|
#define NM_802_11_CAP_RESERVED2 0x00000020
|
||||||
#define NM_802_11_CAP_KEY_MGMT_PSK 0x00000040
|
#define NM_802_11_CAP_KEY_MGMT_PSK 0x00000040
|
||||||
#define NM_802_11_CAP_KEY_MGMT_802_1X 0x00000080
|
#define NM_802_11_CAP_KEY_MGMT_802_1X 0x00000080
|
||||||
#define NM_802_11_CAP_RESERVED3 0x00000100
|
#define NM_802_11_CAP_RESERVED3 0x00000100
|
||||||
#define NM_802_11_CAP_RESERVED4 0x00000200
|
#define NM_802_11_CAP_RESERVED4 0x00000200
|
||||||
#define NM_802_11_CAP_RESERVED5 0x00000400
|
#define NM_802_11_CAP_RESERVED5 0x00000400
|
||||||
#define NM_802_11_CAP_RESERVED6 0x00000800
|
#define NM_802_11_CAP_RESERVED6 0x00000800
|
||||||
#define NM_802_11_CAP_CIPHER_WEP40 0x00001000
|
#define NM_802_11_CAP_CIPHER_WEP40 0x00001000
|
||||||
#define NM_802_11_CAP_CIPHER_WEP104 0x00002000
|
#define NM_802_11_CAP_CIPHER_WEP104 0x00002000
|
||||||
#define NM_802_11_CAP_CIPHER_TKIP 0x00004000
|
#define NM_802_11_CAP_CIPHER_TKIP 0x00004000
|
||||||
#define NM_802_11_CAP_CIPHER_CCMP 0x00008000
|
#define NM_802_11_CAP_CIPHER_CCMP 0x00008000
|
||||||
|
|
||||||
/* Let wpa_supplicant figure out the cipher */
|
/*
|
||||||
#define NM_AUTH_CIPHER_AUTO 0x0
|
* NM-supported Authentication Methods
|
||||||
|
*/
|
||||||
|
#define NM_AUTH_TYPE_WPA_PSK_AUTO 0x00000000
|
||||||
|
#define NM_AUTH_TYPE_NONE 0x00000001
|
||||||
|
#define NM_AUTH_TYPE_WEP40 0x00000002
|
||||||
|
#define NM_AUTH_TYPE_WPA_PSK_TKIP 0x00000004
|
||||||
|
#define NM_AUTH_TYPE_WPA_PSK_CCMP 0x00000008
|
||||||
|
#define NM_AUTH_TYPE_WEP104 0x00000010
|
||||||
|
#define NM_AUTH_TYPE_WPA_EAP 0x00000020
|
||||||
|
|
||||||
|
/*
|
||||||
|
* EAP Methods
|
||||||
|
*/
|
||||||
|
#define NM_EAP_METHOD_MD5 0x00000001 /* EAP-MD5 */
|
||||||
|
#define NM_EAP_METHOD_MSCHAP 0x00000002 /* EAP-MSCHAPv2 */
|
||||||
|
#define NM_EAP_METHOD_OTP 0x00000004 /* EAP-OTP */
|
||||||
|
#define NM_EAP_METHOD_GTC 0x00000008 /* EAP-GTC */
|
||||||
|
#define NM_EAP_METHOD_PEAP 0x00000010 /* EAP-PEAP */
|
||||||
|
#define NM_EAP_METHOD_TLS 0x00000020 /* EAP-TLS */
|
||||||
|
#define NM_EAP_METHOD_TTLS 0x00000040 /* EAP-TTLS */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Wireless network update types
|
* Wireless network update types
|
||||||
|
@@ -37,7 +37,7 @@ IEEE_802_11_Cipher * cipher_wpa_psk_hex_new (void)
|
|||||||
IEEE_802_11_Cipher * cipher = g_malloc0 (sizeof (IEEE_802_11_Cipher));
|
IEEE_802_11_Cipher * cipher = g_malloc0 (sizeof (IEEE_802_11_Cipher));
|
||||||
|
|
||||||
cipher->refcount = 1;
|
cipher->refcount = 1;
|
||||||
cipher->we_cipher = NM_AUTH_CIPHER_AUTO;
|
cipher->we_cipher = NM_AUTH_TYPE_WPA_PSK_AUTO;
|
||||||
cipher->input_min = HEXSTR_WPA_PMK_LEN;
|
cipher->input_min = HEXSTR_WPA_PMK_LEN;
|
||||||
cipher->input_max = HEXSTR_WPA_PMK_LEN;
|
cipher->input_max = HEXSTR_WPA_PMK_LEN;
|
||||||
cipher->cipher_hash_func = cipher_wpa_psk_hex_hash_func;
|
cipher->cipher_hash_func = cipher_wpa_psk_hex_hash_func;
|
||||||
@@ -50,8 +50,8 @@ IEEE_802_11_Cipher * cipher_wpa_psk_hex_new (void)
|
|||||||
void cipher_wpa_psk_hex_set_we_cipher (IEEE_802_11_Cipher *cipher, int we_cipher)
|
void cipher_wpa_psk_hex_set_we_cipher (IEEE_802_11_Cipher *cipher, int we_cipher)
|
||||||
{
|
{
|
||||||
g_return_if_fail (cipher != NULL);
|
g_return_if_fail (cipher != NULL);
|
||||||
g_return_if_fail ((we_cipher == NM_AUTH_CIPHER_AUTO || we_cipher == IW_AUTH_CIPHER_TKIP) || (we_cipher == IW_AUTH_CIPHER_CCMP));
|
g_return_if_fail ((we_cipher == NM_AUTH_TYPE_WPA_PSK_AUTO || we_cipher == IW_AUTH_CIPHER_TKIP) || (we_cipher == IW_AUTH_CIPHER_CCMP));
|
||||||
g_return_if_fail ((cipher->we_cipher == NM_AUTH_CIPHER_AUTO || cipher->we_cipher == IW_AUTH_CIPHER_TKIP) || (cipher->we_cipher == IW_AUTH_CIPHER_CCMP));
|
g_return_if_fail ((cipher->we_cipher == NM_AUTH_TYPE_WPA_PSK_AUTO || cipher->we_cipher == IW_AUTH_CIPHER_TKIP) || (cipher->we_cipher == IW_AUTH_CIPHER_CCMP));
|
||||||
|
|
||||||
cipher->we_cipher = we_cipher;
|
cipher->we_cipher = we_cipher;
|
||||||
}
|
}
|
||||||
|
@@ -38,7 +38,7 @@ IEEE_802_11_Cipher * cipher_wpa_psk_passphrase_new (void)
|
|||||||
IEEE_802_11_Cipher * cipher = g_malloc0 (sizeof (IEEE_802_11_Cipher));
|
IEEE_802_11_Cipher * cipher = g_malloc0 (sizeof (IEEE_802_11_Cipher));
|
||||||
|
|
||||||
cipher->refcount = 1;
|
cipher->refcount = 1;
|
||||||
cipher->we_cipher = NM_AUTH_CIPHER_AUTO;
|
cipher->we_cipher = NM_AUTH_TYPE_WPA_PSK_AUTO;
|
||||||
/* Passphrase between 8 and 63 characters inclusive */
|
/* Passphrase between 8 and 63 characters inclusive */
|
||||||
cipher->input_min = 8;
|
cipher->input_min = 8;
|
||||||
cipher->input_max = (WPA_PMK_LEN * 2) - 1;
|
cipher->input_max = (WPA_PMK_LEN * 2) - 1;
|
||||||
@@ -52,8 +52,8 @@ IEEE_802_11_Cipher * cipher_wpa_psk_passphrase_new (void)
|
|||||||
void cipher_wpa_psk_passphrase_set_we_cipher (IEEE_802_11_Cipher *cipher, int we_cipher)
|
void cipher_wpa_psk_passphrase_set_we_cipher (IEEE_802_11_Cipher *cipher, int we_cipher)
|
||||||
{
|
{
|
||||||
g_return_if_fail (cipher != NULL);
|
g_return_if_fail (cipher != NULL);
|
||||||
g_return_if_fail ((we_cipher == NM_AUTH_CIPHER_AUTO || we_cipher == IW_AUTH_CIPHER_TKIP) || (we_cipher == IW_AUTH_CIPHER_CCMP));
|
g_return_if_fail ((we_cipher == NM_AUTH_TYPE_WPA_PSK_AUTO || we_cipher == IW_AUTH_CIPHER_TKIP) || (we_cipher == IW_AUTH_CIPHER_CCMP));
|
||||||
g_return_if_fail ((cipher->we_cipher == NM_AUTH_CIPHER_AUTO || cipher->we_cipher == IW_AUTH_CIPHER_TKIP) || (cipher->we_cipher == IW_AUTH_CIPHER_CCMP));
|
g_return_if_fail ((cipher->we_cipher == NM_AUTH_TYPE_WPA_PSK_AUTO || cipher->we_cipher == IW_AUTH_CIPHER_TKIP) || (cipher->we_cipher == IW_AUTH_CIPHER_CCMP));
|
||||||
|
|
||||||
cipher->we_cipher = we_cipher;
|
cipher->we_cipher = we_cipher;
|
||||||
}
|
}
|
||||||
|
@@ -24,6 +24,7 @@
|
|||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
#include <iwlib.h>
|
#include <iwlib.h>
|
||||||
|
|
||||||
|
#include "NetworkManager.h"
|
||||||
#include "dbus-helpers.h"
|
#include "dbus-helpers.h"
|
||||||
#include "cipher.h"
|
#include "cipher.h"
|
||||||
|
|
||||||
@@ -163,10 +164,10 @@ nmu_security_serialize_wpa_psk (DBusMessageIter *iter,
|
|||||||
|
|
||||||
dbus_bool_t
|
dbus_bool_t
|
||||||
nmu_security_deserialize_wpa_psk (DBusMessageIter *iter,
|
nmu_security_deserialize_wpa_psk (DBusMessageIter *iter,
|
||||||
char **key,
|
char **key,
|
||||||
int *key_len,
|
int *key_len,
|
||||||
int *wpa_version,
|
int *wpa_version,
|
||||||
int *key_mgt)
|
int *key_mgt)
|
||||||
{
|
{
|
||||||
char * dbus_key;
|
char * dbus_key;
|
||||||
dbus_int32_t dbus_wpa_version;
|
dbus_int32_t dbus_wpa_version;
|
||||||
@@ -208,13 +209,14 @@ nmu_security_deserialize_wpa_psk (DBusMessageIter *iter,
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
dbus_bool_t
|
dbus_bool_t
|
||||||
nmu_security_serialize_wpa_psk_with_cipher (DBusMessage *message,
|
nmu_security_serialize_wpa_psk_with_cipher (DBusMessage *message,
|
||||||
IEEE_802_11_Cipher *cipher,
|
IEEE_802_11_Cipher *cipher,
|
||||||
const char *ssid,
|
const char *ssid,
|
||||||
const char *input,
|
const char *input,
|
||||||
int wpa_version,
|
int wpa_version,
|
||||||
int key_mgt)
|
int key_mgt)
|
||||||
{
|
{
|
||||||
char * key = NULL;
|
char * key = NULL;
|
||||||
dbus_bool_t result = TRUE;
|
dbus_bool_t result = TRUE;
|
||||||
@@ -238,6 +240,206 @@ nmu_security_serialize_wpa_psk_with_cipher (DBusMessage *message,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
dbus_bool_t
|
||||||
|
nmu_security_serialize_wpa_eap (DBusMessageIter *iter,
|
||||||
|
int eap_method,
|
||||||
|
const char *identity,
|
||||||
|
const char *passwd,
|
||||||
|
const char *anon_identity,
|
||||||
|
const char *private_key_passwd,
|
||||||
|
const char *private_key_file,
|
||||||
|
const char *client_cert_file,
|
||||||
|
const char *ca_cert_file,
|
||||||
|
int wpa_version)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (iter != NULL, FALSE);
|
||||||
|
g_return_val_if_fail ((wpa_version == IW_AUTH_WPA_VERSION_WPA) || (wpa_version == IW_AUTH_WPA_VERSION_WPA2), FALSE);
|
||||||
|
g_return_val_if_fail ((eap_method == NM_EAP_METHOD_MD5)
|
||||||
|
|| (eap_method == NM_EAP_METHOD_MSCHAP)
|
||||||
|
|| (eap_method == NM_EAP_METHOD_OTP)
|
||||||
|
|| (eap_method == NM_EAP_METHOD_GTC)
|
||||||
|
|| (eap_method == NM_EAP_METHOD_PEAP)
|
||||||
|
|| (eap_method == NM_EAP_METHOD_TLS)
|
||||||
|
|| (eap_method == NM_EAP_METHOD_TTLS), FALSE);
|
||||||
|
|
||||||
|
/* Second arg: EAP method (INT32) */
|
||||||
|
dbus_message_iter_append_basic (iter, DBUS_TYPE_INT32, &eap_method);
|
||||||
|
|
||||||
|
/* Third arg: Identity (STRING) */
|
||||||
|
dbus_message_iter_append_basic (iter, DBUS_TYPE_STRING, &identity);
|
||||||
|
|
||||||
|
/* Fourth arg: Password (STRING) */
|
||||||
|
dbus_message_iter_append_basic (iter, DBUS_TYPE_STRING, &passwd);
|
||||||
|
|
||||||
|
/* Fifth arg: Anonymous Identity (STRING) */
|
||||||
|
dbus_message_iter_append_basic (iter, DBUS_TYPE_STRING, &anon_identity);
|
||||||
|
|
||||||
|
/* Sixth arg: Private key password (STRING) */
|
||||||
|
dbus_message_iter_append_basic (iter, DBUS_TYPE_STRING, &private_key_passwd);
|
||||||
|
|
||||||
|
/* Seventh arg: Private key file (STRING) */
|
||||||
|
dbus_message_iter_append_basic (iter, DBUS_TYPE_STRING, &private_key_file);
|
||||||
|
|
||||||
|
/* Eighth arg: Client certificate file (STRING) */
|
||||||
|
dbus_message_iter_append_basic (iter, DBUS_TYPE_STRING, &client_cert_file);
|
||||||
|
|
||||||
|
/* Ninth arg: CA certificate file (STRING) */
|
||||||
|
dbus_message_iter_append_basic (iter, DBUS_TYPE_STRING, &ca_cert_file);
|
||||||
|
|
||||||
|
/* Tenth and final arg: WPA version (INT32) */
|
||||||
|
dbus_message_iter_append_basic (iter, DBUS_TYPE_INT32, &wpa_version);
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
dbus_bool_t
|
||||||
|
nmu_security_serialize_wpa_eap_with_cipher (DBusMessageIter *iter,
|
||||||
|
int eap_method,
|
||||||
|
const char *identity,
|
||||||
|
const char *passwd,
|
||||||
|
const char *anon_identity,
|
||||||
|
const char *private_key_passwd,
|
||||||
|
const char *private_key_file,
|
||||||
|
const char *client_cert_file,
|
||||||
|
const char *ca_cert_file,
|
||||||
|
int wpa_version)
|
||||||
|
{
|
||||||
|
dbus_bool_t result;
|
||||||
|
|
||||||
|
g_return_val_if_fail (iter != NULL, FALSE);
|
||||||
|
g_return_val_if_fail ((wpa_version == IW_AUTH_WPA_VERSION_WPA) || (wpa_version == IW_AUTH_WPA_VERSION_WPA2), FALSE);
|
||||||
|
g_return_val_if_fail ((eap_method == NM_EAP_METHOD_MD5)
|
||||||
|
|| (eap_method == NM_EAP_METHOD_MSCHAP)
|
||||||
|
|| (eap_method == NM_EAP_METHOD_OTP)
|
||||||
|
|| (eap_method == NM_EAP_METHOD_GTC)
|
||||||
|
|| (eap_method == NM_EAP_METHOD_PEAP)
|
||||||
|
|| (eap_method == NM_EAP_METHOD_TLS)
|
||||||
|
|| (eap_method == NM_EAP_METHOD_TTLS), FALSE);
|
||||||
|
|
||||||
|
/* First arg: WE Cipher (INT32) */
|
||||||
|
we_cipher_append_helper (iter, NM_AUTH_TYPE_WPA_EAP);
|
||||||
|
|
||||||
|
result = nmu_security_serialize_wpa_eap (iter, eap_method, identity, passwd, anon_identity, private_key_passwd,
|
||||||
|
private_key_file, client_cert_file, ca_cert_file, wpa_version);
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
dbus_bool_t
|
||||||
|
nmu_security_deserialize_wpa_eap (DBusMessageIter *iter,
|
||||||
|
int *eap_method,
|
||||||
|
char **identity,
|
||||||
|
char **passwd,
|
||||||
|
char **anon_identity,
|
||||||
|
char **private_key_passwd,
|
||||||
|
char **private_key_file,
|
||||||
|
char **client_cert_file,
|
||||||
|
char **ca_cert_file,
|
||||||
|
int *wpa_version)
|
||||||
|
{
|
||||||
|
char * dbus_identity;
|
||||||
|
char * dbus_password;
|
||||||
|
char * dbus_anon_identity;
|
||||||
|
char * dbus_private_key_passwd;
|
||||||
|
char * dbus_private_key_file;
|
||||||
|
char * dbus_client_cert_file;
|
||||||
|
char * dbus_ca_cert_file;
|
||||||
|
dbus_int32_t dbus_wpa_version;
|
||||||
|
dbus_int32_t dbus_eap_method;
|
||||||
|
|
||||||
|
g_return_val_if_fail (iter != NULL, FALSE);
|
||||||
|
g_return_val_if_fail (identity != NULL, FALSE);
|
||||||
|
g_return_val_if_fail (*identity == NULL, FALSE);
|
||||||
|
g_return_val_if_fail (passwd != NULL, FALSE);
|
||||||
|
g_return_val_if_fail (*passwd == NULL, FALSE);
|
||||||
|
g_return_val_if_fail (anon_identity != NULL, FALSE);
|
||||||
|
g_return_val_if_fail (*anon_identity == NULL, FALSE);
|
||||||
|
g_return_val_if_fail (private_key_passwd != NULL, FALSE);
|
||||||
|
g_return_val_if_fail (*private_key_passwd == NULL, FALSE);
|
||||||
|
g_return_val_if_fail (private_key_file != NULL, FALSE);
|
||||||
|
g_return_val_if_fail (*private_key_file == NULL, FALSE);
|
||||||
|
g_return_val_if_fail (client_cert_file != NULL, FALSE);
|
||||||
|
g_return_val_if_fail (*client_cert_file == NULL, FALSE);
|
||||||
|
g_return_val_if_fail (ca_cert_file != NULL, FALSE);
|
||||||
|
g_return_val_if_fail (*ca_cert_file == NULL, FALSE);
|
||||||
|
g_return_val_if_fail (wpa_version != NULL, FALSE);
|
||||||
|
|
||||||
|
/* Second arg: EAP method (INT32) */
|
||||||
|
g_return_val_if_fail (dbus_message_iter_get_arg_type (iter) == DBUS_TYPE_INT32, FALSE);
|
||||||
|
dbus_message_iter_get_basic (iter, &dbus_eap_method);
|
||||||
|
g_return_val_if_fail ((dbus_eap_method == NM_EAP_METHOD_MD5)
|
||||||
|
|| (dbus_eap_method == NM_EAP_METHOD_MSCHAP)
|
||||||
|
|| (dbus_eap_method == NM_EAP_METHOD_OTP)
|
||||||
|
|| (dbus_eap_method == NM_EAP_METHOD_GTC)
|
||||||
|
|| (dbus_eap_method == NM_EAP_METHOD_PEAP)
|
||||||
|
|| (dbus_eap_method == NM_EAP_METHOD_TLS)
|
||||||
|
|| (dbus_eap_method == NM_EAP_METHOD_TTLS), FALSE);
|
||||||
|
|
||||||
|
/* Third arg: Identity (STRING) */
|
||||||
|
g_return_val_if_fail (dbus_message_iter_next (iter), FALSE);
|
||||||
|
g_return_val_if_fail (dbus_message_iter_get_arg_type (iter) == DBUS_TYPE_STRING, FALSE);
|
||||||
|
dbus_message_iter_get_basic (iter, &dbus_identity);
|
||||||
|
g_return_val_if_fail (dbus_identity != NULL, FALSE);
|
||||||
|
|
||||||
|
/* Fourth arg: Password (STRING) */
|
||||||
|
g_return_val_if_fail (dbus_message_iter_next (iter), FALSE);
|
||||||
|
g_return_val_if_fail (dbus_message_iter_get_arg_type (iter) == DBUS_TYPE_STRING, FALSE);
|
||||||
|
dbus_message_iter_get_basic (iter, &dbus_password);
|
||||||
|
g_return_val_if_fail (dbus_password != NULL, FALSE);
|
||||||
|
|
||||||
|
/* Fifth arg: Anonymous Identity (STRING) */
|
||||||
|
g_return_val_if_fail (dbus_message_iter_next (iter), FALSE);
|
||||||
|
g_return_val_if_fail (dbus_message_iter_get_arg_type (iter) == DBUS_TYPE_STRING, FALSE);
|
||||||
|
dbus_message_iter_get_basic (iter, &dbus_anon_identity);
|
||||||
|
g_return_val_if_fail (dbus_anon_identity != NULL, FALSE);
|
||||||
|
|
||||||
|
/* Sixth arg: Private key password (STRING) */
|
||||||
|
g_return_val_if_fail (dbus_message_iter_next (iter), FALSE);
|
||||||
|
g_return_val_if_fail (dbus_message_iter_get_arg_type (iter) == DBUS_TYPE_STRING, FALSE);
|
||||||
|
dbus_message_iter_get_basic (iter, &dbus_private_key_passwd);
|
||||||
|
g_return_val_if_fail (dbus_private_key_passwd != NULL, FALSE);
|
||||||
|
|
||||||
|
/* Seventh arg: Private key file (STRING) */
|
||||||
|
g_return_val_if_fail (dbus_message_iter_next (iter), FALSE);
|
||||||
|
g_return_val_if_fail (dbus_message_iter_get_arg_type (iter) == DBUS_TYPE_STRING, FALSE);
|
||||||
|
dbus_message_iter_get_basic (iter, &dbus_private_key_file);
|
||||||
|
g_return_val_if_fail (dbus_private_key_file != NULL, FALSE);
|
||||||
|
|
||||||
|
/* Eighth arg: Client certificate file (STRING) */
|
||||||
|
g_return_val_if_fail (dbus_message_iter_next (iter), FALSE);
|
||||||
|
g_return_val_if_fail (dbus_message_iter_get_arg_type (iter) == DBUS_TYPE_STRING, FALSE);
|
||||||
|
dbus_message_iter_get_basic (iter, &dbus_client_cert_file);
|
||||||
|
g_return_val_if_fail (dbus_client_cert_file != NULL, FALSE);
|
||||||
|
|
||||||
|
/* Ninth arg: CA certificate file (STRING) */
|
||||||
|
g_return_val_if_fail (dbus_message_iter_next (iter), FALSE);
|
||||||
|
g_return_val_if_fail (dbus_message_iter_get_arg_type (iter) == DBUS_TYPE_STRING, FALSE);
|
||||||
|
dbus_message_iter_get_basic (iter, &dbus_ca_cert_file);
|
||||||
|
g_return_val_if_fail (dbus_ca_cert_file != NULL, FALSE);
|
||||||
|
|
||||||
|
/* Tenth and final arg: WPA version (INT32) */
|
||||||
|
g_return_val_if_fail (dbus_message_iter_next (iter), FALSE);
|
||||||
|
g_return_val_if_fail (dbus_message_iter_get_arg_type (iter) == DBUS_TYPE_INT32, FALSE);
|
||||||
|
dbus_message_iter_get_basic (iter, &dbus_wpa_version);
|
||||||
|
g_return_val_if_fail ((dbus_wpa_version == IW_AUTH_WPA_VERSION_WPA)
|
||||||
|
|| (dbus_wpa_version == IW_AUTH_WPA_VERSION_WPA2), FALSE);
|
||||||
|
|
||||||
|
*eap_method = dbus_eap_method;
|
||||||
|
*identity = strlen (dbus_identity) > 0 ? dbus_identity : NULL;
|
||||||
|
*passwd = strlen (dbus_password) > 0 ? dbus_password : NULL;
|
||||||
|
*anon_identity = strlen (dbus_anon_identity) > 0 ? dbus_anon_identity : NULL;
|
||||||
|
*private_key_passwd = strlen (dbus_private_key_passwd) > 0 ? dbus_private_key_passwd : NULL;
|
||||||
|
*private_key_file = strlen (dbus_private_key_file) > 0 ? dbus_private_key_file : NULL;
|
||||||
|
*client_cert_file = strlen (dbus_client_cert_file) > 0 ? dbus_client_cert_file : NULL;
|
||||||
|
*ca_cert_file = strlen (dbus_ca_cert_file) > 0 ? dbus_ca_cert_file : NULL;
|
||||||
|
*wpa_version = dbus_wpa_version;
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* nmu_create_dbus_error_message
|
* nmu_create_dbus_error_message
|
||||||
*
|
*
|
||||||
|
@@ -65,6 +65,39 @@ dbus_bool_t nmu_security_serialize_wpa_psk_with_cipher (DBusMessage *message,
|
|||||||
int wpa_version,
|
int wpa_version,
|
||||||
int key_mgt);
|
int key_mgt);
|
||||||
|
|
||||||
|
dbus_bool_t nmu_security_serialize_wpa_eap (DBusMessageIter *iter,
|
||||||
|
int eap_method,
|
||||||
|
const char *identity,
|
||||||
|
const char *passwd,
|
||||||
|
const char *anon_identity,
|
||||||
|
const char *private_key_passwd,
|
||||||
|
const char *private_key_file,
|
||||||
|
const char *client_cert_file,
|
||||||
|
const char *ca_cert_file,
|
||||||
|
int wpa_version);
|
||||||
|
|
||||||
|
dbus_bool_t nmu_security_serialize_wpa_eap_with_cipher (DBusMessageIter *iter,
|
||||||
|
int eap_method,
|
||||||
|
const char *identity,
|
||||||
|
const char *passwd,
|
||||||
|
const char *anon_identity,
|
||||||
|
const char *private_key_passwd,
|
||||||
|
const char *private_key_file,
|
||||||
|
const char *client_cert_file,
|
||||||
|
const char *ca_cert_file,
|
||||||
|
int wpa_version);
|
||||||
|
|
||||||
|
dbus_bool_t nmu_security_deserialize_wpa_eap (DBusMessageIter *iter,
|
||||||
|
int *eap_method,
|
||||||
|
char **identity,
|
||||||
|
char **passwd,
|
||||||
|
char **anon_identity,
|
||||||
|
char **private_key_passwd,
|
||||||
|
char **private_key_file,
|
||||||
|
char **client_cert_file,
|
||||||
|
char **ca_cert_file,
|
||||||
|
int *wpa_version);
|
||||||
|
|
||||||
DBusMessage * nmu_create_dbus_error_message (DBusMessage *message,
|
DBusMessage * nmu_create_dbus_error_message (DBusMessage *message,
|
||||||
const char *exception_namespace,
|
const char *exception_namespace,
|
||||||
const char *exception,
|
const char *exception,
|
||||||
|
@@ -56,6 +56,8 @@ NetworkManager_SOURCES = \
|
|||||||
nm-ap-security-private.h \
|
nm-ap-security-private.h \
|
||||||
nm-ap-security-wep.c \
|
nm-ap-security-wep.c \
|
||||||
nm-ap-security-wep.h \
|
nm-ap-security-wep.h \
|
||||||
|
nm-ap-security-wpa-eap.c \
|
||||||
|
nm-ap-security-wpa-eap.h \
|
||||||
nm-ap-security-wpa-psk.c \
|
nm-ap-security-wpa-psk.c \
|
||||||
nm-ap-security-wpa-psk.h \
|
nm-ap-security-wpa-psk.h \
|
||||||
kernel-types.h \
|
kernel-types.h \
|
||||||
|
@@ -578,11 +578,17 @@ static guint32 add_capabilities_from_cipher (guint32 caps, int cipher)
|
|||||||
caps &= ~NM_802_11_CAP_PROTO_NONE;
|
caps &= ~NM_802_11_CAP_PROTO_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cipher == NM_AUTH_CIPHER_AUTO)
|
if (cipher == NM_AUTH_TYPE_WPA_PSK_AUTO)
|
||||||
{
|
{
|
||||||
caps &= ~NM_802_11_CAP_PROTO_NONE;
|
caps &= ~NM_802_11_CAP_PROTO_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (cipher == NM_AUTH_TYPE_WPA_EAP)
|
||||||
|
{
|
||||||
|
caps |= NM_802_11_CAP_KEY_MGMT_802_1X;
|
||||||
|
caps &= ~NM_802_11_CAP_PROTO_NONE;
|
||||||
|
}
|
||||||
|
|
||||||
return caps;
|
return caps;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -74,7 +74,7 @@ nm_ap_security_wpa_psk_new_deserialize (DBusMessageIter *iter, int we_cipher)
|
|||||||
int key_mgt;
|
int key_mgt;
|
||||||
|
|
||||||
g_return_val_if_fail (iter != NULL, NULL);
|
g_return_val_if_fail (iter != NULL, NULL);
|
||||||
g_return_val_if_fail (we_cipher == NM_AUTH_CIPHER_AUTO || we_cipher == IW_AUTH_CIPHER_TKIP || we_cipher == IW_AUTH_CIPHER_CCMP, NULL);
|
g_return_val_if_fail (we_cipher == NM_AUTH_TYPE_WPA_PSK_AUTO || we_cipher == IW_AUTH_CIPHER_TKIP || we_cipher == IW_AUTH_CIPHER_CCMP, NULL);
|
||||||
|
|
||||||
if (!nmu_security_deserialize_wpa_psk (iter, &key, &key_len, &wpa_version, &key_mgt))
|
if (!nmu_security_deserialize_wpa_psk (iter, &key, &key_len, &wpa_version, &key_mgt))
|
||||||
goto out;
|
goto out;
|
||||||
@@ -83,7 +83,7 @@ nm_ap_security_wpa_psk_new_deserialize (DBusMessageIter *iter, int we_cipher)
|
|||||||
security = g_object_new (NM_TYPE_AP_SECURITY_WPA_PSK, NULL);
|
security = g_object_new (NM_TYPE_AP_SECURITY_WPA_PSK, NULL);
|
||||||
nm_ap_security_set_we_cipher (NM_AP_SECURITY (security), we_cipher);
|
nm_ap_security_set_we_cipher (NM_AP_SECURITY (security), we_cipher);
|
||||||
if (key)
|
if (key)
|
||||||
nm_ap_security_set_key (NM_AP_SECURITY (security), key, key_len);
|
nm_ap_security_set_key (NM_AP_SECURITY (security), key, key_len); /* FIXME: Free 'key' ? */
|
||||||
security->priv->wpa_version = wpa_version;
|
security->priv->wpa_version = wpa_version;
|
||||||
security->priv->key_mgt = key_mgt;
|
security->priv->key_mgt = key_mgt;
|
||||||
|
|
||||||
@@ -100,7 +100,7 @@ nm_ap_security_wpa_psk_new_from_ap (NMAccessPoint *ap, int we_cipher)
|
|||||||
guint32 caps;
|
guint32 caps;
|
||||||
|
|
||||||
g_return_val_if_fail (ap != NULL, NULL);
|
g_return_val_if_fail (ap != NULL, NULL);
|
||||||
g_return_val_if_fail (we_cipher == NM_AUTH_CIPHER_AUTO || we_cipher == IW_AUTH_CIPHER_TKIP || (we_cipher == IW_AUTH_CIPHER_CCMP), NULL);
|
g_return_val_if_fail (we_cipher == NM_AUTH_TYPE_WPA_PSK_AUTO || we_cipher == IW_AUTH_CIPHER_TKIP || (we_cipher == IW_AUTH_CIPHER_CCMP), NULL);
|
||||||
|
|
||||||
security = g_object_new (NM_TYPE_AP_SECURITY_WPA_PSK, NULL);
|
security = g_object_new (NM_TYPE_AP_SECURITY_WPA_PSK, NULL);
|
||||||
nm_ap_security_set_we_cipher (NM_AP_SECURITY (security), we_cipher);
|
nm_ap_security_set_we_cipher (NM_AP_SECURITY (security), we_cipher);
|
||||||
@@ -193,7 +193,7 @@ real_write_supplicant_config (NMAPSecurity *instance,
|
|||||||
pairwise_cipher = "NONE";
|
pairwise_cipher = "NONE";
|
||||||
|
|
||||||
/* If user selected "Automatic", we let wpa_supplicant sort it out */
|
/* If user selected "Automatic", we let wpa_supplicant sort it out */
|
||||||
if (cipher != NM_AUTH_CIPHER_AUTO)
|
if (cipher != NM_AUTH_TYPE_WPA_PSK_AUTO)
|
||||||
{
|
{
|
||||||
if (!nm_utils_supplicant_request_with_check (ctrl, "OK", __func__, NULL,
|
if (!nm_utils_supplicant_request_with_check (ctrl, "OK", __func__, NULL,
|
||||||
"SET_NETWORK %i pairwise %s", nwid, pairwise_cipher))
|
"SET_NETWORK %i pairwise %s", nwid, pairwise_cipher))
|
||||||
|
@@ -28,6 +28,7 @@
|
|||||||
#include "nm-ap-security-private.h"
|
#include "nm-ap-security-private.h"
|
||||||
#include "nm-ap-security-wep.h"
|
#include "nm-ap-security-wep.h"
|
||||||
#include "nm-ap-security-wpa-psk.h"
|
#include "nm-ap-security-wpa-psk.h"
|
||||||
|
#include "nm-ap-security-wpa-eap.h"
|
||||||
#include "nm-device-802-11-wireless.h"
|
#include "nm-device-802-11-wireless.h"
|
||||||
#include "wpa_ctrl.h"
|
#include "wpa_ctrl.h"
|
||||||
#include "nm-utils.h"
|
#include "nm-utils.h"
|
||||||
@@ -85,13 +86,18 @@ nm_ap_security_new_deserialize (DBusMessageIter *iter)
|
|||||||
security = NM_AP_SECURITY (nm_ap_security_wep_new_deserialize (iter, we_cipher));
|
security = NM_AP_SECURITY (nm_ap_security_wep_new_deserialize (iter, we_cipher));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case NM_AUTH_CIPHER_AUTO:
|
case NM_AUTH_TYPE_WPA_PSK_AUTO:
|
||||||
case IW_AUTH_CIPHER_TKIP:
|
case IW_AUTH_CIPHER_TKIP:
|
||||||
case IW_AUTH_CIPHER_CCMP:
|
case IW_AUTH_CIPHER_CCMP:
|
||||||
security = NM_AP_SECURITY (nm_ap_security_wpa_psk_new_deserialize (iter, we_cipher));
|
security = NM_AP_SECURITY (nm_ap_security_wpa_psk_new_deserialize (iter, we_cipher));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case NM_AUTH_TYPE_WPA_EAP:
|
||||||
|
security = NM_AP_SECURITY (nm_ap_security_wpa_eap_new_deserialize (iter));
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
nm_warning ("Unmatched cipher %d", we_cipher);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -103,8 +109,10 @@ out:
|
|||||||
|
|
||||||
#define WPA2_CCMP_PSK (NM_802_11_CAP_PROTO_WPA2 | NM_802_11_CAP_CIPHER_CCMP | NM_802_11_CAP_KEY_MGMT_PSK)
|
#define WPA2_CCMP_PSK (NM_802_11_CAP_PROTO_WPA2 | NM_802_11_CAP_CIPHER_CCMP | NM_802_11_CAP_KEY_MGMT_PSK)
|
||||||
#define WPA2_TKIP_PSK (NM_802_11_CAP_PROTO_WPA2 | NM_802_11_CAP_CIPHER_TKIP | NM_802_11_CAP_KEY_MGMT_PSK)
|
#define WPA2_TKIP_PSK (NM_802_11_CAP_PROTO_WPA2 | NM_802_11_CAP_CIPHER_TKIP | NM_802_11_CAP_KEY_MGMT_PSK)
|
||||||
|
#define WPA2_EAP (NM_802_11_CAP_PROTO_WPA2 | NM_802_11_CAP_KEY_MGMT_802_1X)
|
||||||
#define WPA_CCMP_PSK (NM_802_11_CAP_PROTO_WPA | NM_802_11_CAP_CIPHER_CCMP | NM_802_11_CAP_KEY_MGMT_PSK)
|
#define WPA_CCMP_PSK (NM_802_11_CAP_PROTO_WPA | NM_802_11_CAP_CIPHER_CCMP | NM_802_11_CAP_KEY_MGMT_PSK)
|
||||||
#define WPA_TKIP_PSK (NM_802_11_CAP_PROTO_WPA | NM_802_11_CAP_CIPHER_TKIP | NM_802_11_CAP_KEY_MGMT_PSK)
|
#define WPA_TKIP_PSK (NM_802_11_CAP_PROTO_WPA | NM_802_11_CAP_CIPHER_TKIP | NM_802_11_CAP_KEY_MGMT_PSK)
|
||||||
|
#define WPA_EAP (NM_802_11_CAP_PROTO_WPA | NM_802_11_CAP_KEY_MGMT_802_1X)
|
||||||
#define WEP_WEP104 (NM_802_11_CAP_PROTO_WEP | NM_802_11_CAP_CIPHER_WEP104)
|
#define WEP_WEP104 (NM_802_11_CAP_PROTO_WEP | NM_802_11_CAP_CIPHER_WEP104)
|
||||||
#define WEP_WEP40 (NM_802_11_CAP_PROTO_WEP | NM_802_11_CAP_CIPHER_WEP40)
|
#define WEP_WEP40 (NM_802_11_CAP_PROTO_WEP | NM_802_11_CAP_CIPHER_WEP40)
|
||||||
NMAPSecurity *
|
NMAPSecurity *
|
||||||
@@ -121,6 +129,8 @@ nm_ap_security_new_from_ap (NMAccessPoint *ap)
|
|||||||
security = NM_AP_SECURITY (nm_ap_security_wpa_psk_new_from_ap (ap, IW_AUTH_CIPHER_CCMP));
|
security = NM_AP_SECURITY (nm_ap_security_wpa_psk_new_from_ap (ap, IW_AUTH_CIPHER_CCMP));
|
||||||
else if ((caps & WPA_TKIP_PSK) || (caps & WPA2_TKIP_PSK))
|
else if ((caps & WPA_TKIP_PSK) || (caps & WPA2_TKIP_PSK))
|
||||||
security = NM_AP_SECURITY (nm_ap_security_wpa_psk_new_from_ap (ap, IW_AUTH_CIPHER_TKIP));
|
security = NM_AP_SECURITY (nm_ap_security_wpa_psk_new_from_ap (ap, IW_AUTH_CIPHER_TKIP));
|
||||||
|
else if ((caps & WPA_EAP) || (caps & WPA2_EAP))
|
||||||
|
security = NM_AP_SECURITY (nm_ap_security_wpa_eap_new_from_ap (ap));
|
||||||
else if (caps & WEP_WEP104)
|
else if (caps & WEP_WEP104)
|
||||||
security = NM_AP_SECURITY (nm_ap_security_wep_new_from_ap (ap, IW_AUTH_CIPHER_WEP104));
|
security = NM_AP_SECURITY (nm_ap_security_wep_new_from_ap (ap, IW_AUTH_CIPHER_WEP104));
|
||||||
else if (caps & WEP_WEP40)
|
else if (caps & WEP_WEP40)
|
||||||
@@ -153,18 +163,23 @@ nm_ap_security_set_we_cipher (NMAPSecurity *self, int we_cipher)
|
|||||||
{
|
{
|
||||||
g_return_if_fail (self != NULL);
|
g_return_if_fail (self != NULL);
|
||||||
|
|
||||||
/* Ensure the cipher is valid */
|
/* Ensure that the cipher is valid */
|
||||||
g_return_if_fail (
|
g_return_if_fail (
|
||||||
(we_cipher == NM_AUTH_CIPHER_AUTO)
|
(we_cipher == NM_AUTH_TYPE_WPA_PSK_AUTO)
|
||||||
|| (we_cipher == IW_AUTH_CIPHER_NONE)
|
|| (we_cipher == IW_AUTH_CIPHER_NONE)
|
||||||
|| (we_cipher == IW_AUTH_CIPHER_WEP40)
|
|| (we_cipher == IW_AUTH_CIPHER_WEP40)
|
||||||
|| (we_cipher == IW_AUTH_CIPHER_WEP104)
|
|| (we_cipher == IW_AUTH_CIPHER_WEP104)
|
||||||
|| (we_cipher == IW_AUTH_CIPHER_TKIP)
|
|| (we_cipher == IW_AUTH_CIPHER_TKIP)
|
||||||
|| (we_cipher == IW_AUTH_CIPHER_CCMP));
|
|| (we_cipher == IW_AUTH_CIPHER_CCMP)
|
||||||
|
|| (we_cipher == NM_AUTH_TYPE_WPA_EAP));
|
||||||
|
|
||||||
self->priv->we_cipher = we_cipher;
|
self->priv->we_cipher = we_cipher;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* nm_ap_security_set_key - set the encryption key for a given AP
|
||||||
|
*
|
||||||
|
*/
|
||||||
void
|
void
|
||||||
nm_ap_security_set_key (NMAPSecurity *self, const char *key, int key_len)
|
nm_ap_security_set_key (NMAPSecurity *self, const char *key, int key_len)
|
||||||
{
|
{
|
||||||
@@ -211,7 +226,7 @@ real_write_supplicant_config (NMAPSecurity *self,
|
|||||||
int
|
int
|
||||||
nm_ap_security_get_we_cipher (NMAPSecurity *self)
|
nm_ap_security_get_we_cipher (NMAPSecurity *self)
|
||||||
{
|
{
|
||||||
g_return_val_if_fail (self != NULL, NM_AUTH_CIPHER_AUTO);
|
g_return_val_if_fail (self != NULL, NM_AUTH_TYPE_WPA_PSK_AUTO);
|
||||||
|
|
||||||
return self->priv->we_cipher;
|
return self->priv->we_cipher;
|
||||||
}
|
}
|
||||||
|
@@ -323,8 +323,8 @@ out:
|
|||||||
*/
|
*/
|
||||||
static DBusMessage *nm_dbus_nm_create_wireless_network (DBusConnection *connection, DBusMessage *message, NMDbusCBData *data)
|
static DBusMessage *nm_dbus_nm_create_wireless_network (DBusConnection *connection, DBusMessage *message, NMDbusCBData *data)
|
||||||
{
|
{
|
||||||
const char * INVALID_ARGS_ERROR = "InvalidArguments";
|
const char * INVALID_ARGS_ERROR = "InvalidArguments";
|
||||||
const char * INVALID_ARGS_MESSAGE = "NetworkManager::createWirelessNetwork called with invalid arguments.";
|
const char * INVALID_ARGS_MESSAGE = "NetworkManager::createWirelessNetwork called with invalid arguments.";
|
||||||
NMDevice * dev = NULL;
|
NMDevice * dev = NULL;
|
||||||
DBusMessage * reply = NULL;
|
DBusMessage * reply = NULL;
|
||||||
char * dev_path = NULL;
|
char * dev_path = NULL;
|
||||||
|
@@ -172,6 +172,12 @@ static void detail_network (DBusConnection *connection, const char *path, const
|
|||||||
enc_string = g_string_append_c (enc_string, ' ');
|
enc_string = g_string_append_c (enc_string, ' ');
|
||||||
enc_string = g_string_append (enc_string, "WPA2");
|
enc_string = g_string_append (enc_string, "WPA2");
|
||||||
}
|
}
|
||||||
|
if (capabilities & NM_802_11_CAP_KEY_MGMT_802_1X)
|
||||||
|
{
|
||||||
|
if (enc_string->str && (strlen (enc_string->str) > 0))
|
||||||
|
enc_string = g_string_append_c (enc_string, ' ');
|
||||||
|
enc_string = g_string_append (enc_string, "Enterprise");
|
||||||
|
}
|
||||||
if (enc_string->str && (strlen (enc_string->str) > 0))
|
if (enc_string->str && (strlen (enc_string->str) > 0))
|
||||||
{
|
{
|
||||||
enc_string = g_string_prepend (enc_string, ", Encrypted (");
|
enc_string = g_string_prepend (enc_string, ", Encrypted (");
|
||||||
|
Reference in New Issue
Block a user