File control-center-network-add-domain-suffix-match.patch of Package gnome-control-center.9274
From 4b5380184b9c1c39f2a5b8d48dc9a8cad9a85ed9 mon sep 17 00:00:00 2001
From: Jonathan Kang <jonathan121537@gmail.com>
Date: Tue, 19 Sep 2017 11:15:36 +0800
Subject: [PATCH 1/2] wifi: Use GtkGrid for Wi-Fi Security settings page
GtkTable is deprecated. Use GtkGrid instead.
https://bugzilla.gnome.org/show_bug.cgi?id=787882
---
.../network/wireless-security/eap-method-peap.ui | 97 +++++++++-------------
panels/network/wireless-security/eap-method-tls.ui | 77 ++++++-----------
.../network/wireless-security/eap-method-ttls.ui | 49 ++++-------
3 files changed, 80 insertions(+), 143 deletions(-)
diff --git a/panels/network/wireless-security/eap-method-peap.ui b/panels/network/wireless-security/eap-method-peap.ui
index 8b8959cd6..37dddd643 100644
--- a/panels/network/wireless-security/eap-method-peap.ui
+++ b/panels/network/wireless-security/eap-method-peap.ui
@@ -35,11 +35,9 @@
<property name="show_tabs">False</property>
<property name="show_border">False</property>
<child>
- <object class="GtkTable" id="table13">
+ <object class="GtkGrid" id="eap_peap_grid">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="n_rows">5</property>
- <property name="n_columns">2</property>
<property name="column_spacing">6</property>
<property name="row_spacing">6</property>
<child>
@@ -52,20 +50,20 @@
<property name="mnemonic_widget">eap_peap_anon_identity_entry</property>
</object>
<packing>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"/>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="eap_peap_anon_identity_entry">
<property name="visible">True</property>
<property name="can_focus">True</property>
+ <property name="hexpand">True</property>
<property name="activates_default">True</property>
</object>
<packing>
<property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="y_options"/>
+ <property name="top_attach">0</property>
</packing>
</child>
<child>
@@ -78,24 +76,19 @@
<property name="mnemonic_widget">eap_peap_ca_cert_button</property>
</object>
<packing>
+ <property name="left_attach">0</property>
<property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"/>
</packing>
</child>
<child>
<object class="GtkFileChooserButton" id="eap_peap_ca_cert_button">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="hexpand">True</property>
</object>
<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="x_options">GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
@@ -103,32 +96,46 @@
<property name="label" translatable="yes">No CA certificate is _required</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
+ <property name="hexpand">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
</object>
<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="x_options">GTK_FILL</property>
- <property name="y_options"/>
</packing>
</child>
<child>
- <object class="GtkVBox" id="eap_peap_inner_auth_vbox">
+ <object class="GtkLabel" id="eap_peap_version_label">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">1</property>
+ <property name="label" translatable="yes">PEAP _version</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">eap_peap_version_combo</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBox" id="eap_peap_version_combo">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="model">model9</property>
<child>
- <placeholder/>
+ <object class="GtkCellRendererText" id="renderer9"/>
+ <attributes>
+ <attribute name="text">0</attribute>
+ </attributes>
</child>
</object>
<packing>
- <property name="right_attach">2</property>
- <property name="top_attach">5</property>
- <property name="bottom_attach">6</property>
- <property name="x_options">GTK_FILL</property>
+ <property name="left_attach">1</property>
+ <property name="top_attach">3</property>
</packing>
</child>
<child>
@@ -141,16 +148,15 @@
<property name="mnemonic_widget">eap_peap_inner_auth_combo</property>
</object>
<packing>
+ <property name="left_attach">0</property>
<property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"/>
</packing>
</child>
<child>
<object class="GtkComboBox" id="eap_peap_inner_auth_combo">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="hexpand">True</property>
<property name="model">model8</property>
<child>
<object class="GtkCellRendererText" id="renderer8"/>
@@ -161,48 +167,21 @@
</object>
<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">GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="eap_peap_version_label">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">1</property>
- <property name="label" translatable="yes">PEAP _version</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">eap_peap_version_combo</property>
- </object>
- <packing>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"/>
- </packing>
- </child>
- <child>
- <object class="GtkComboBox" id="eap_peap_version_combo">
+ <object class="GtkVBox" id="eap_peap_inner_auth_vbox">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="model">model9</property>
<child>
- <object class="GtkCellRendererText" id="renderer9"/>
- <attributes>
- <attribute name="text">0</attribute>
- </attributes>
+ <placeholder/>
</child>
</object>
<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="x_options">GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
+ <property name="left_attach">0</property>
+ <property name="top_attach">5</property>
+ <property name="width">2</property>
</packing>
</child>
</object>
diff --git a/panels/network/wireless-security/eap-method-tls.ui b/panels/network/wireless-security/eap-method-tls.ui
index 886767de9..a399460fa 100644
--- a/panels/network/wireless-security/eap-method-tls.ui
+++ b/panels/network/wireless-security/eap-method-tls.ui
@@ -7,12 +7,10 @@
<property name="show_tabs">False</property>
<property name="show_border">False</property>
<child>
- <object class="GtkTable" id="table8">
+ <object class="GtkGrid" id="eap_tls_grid">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">start</property>
- <property name="n_rows">6</property>
- <property name="n_columns">2</property>
<property name="column_spacing">6</property>
<property name="row_spacing">6</property>
<child>
@@ -28,20 +26,20 @@
<property name="mnemonic_widget">eap_tls_identity_entry</property>
</object>
<packing>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"/>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="eap_tls_identity_entry">
<property name="visible">True</property>
<property name="can_focus">True</property>
+ <property name="hexpand">True</property>
<property name="activates_default">True</property>
</object>
<packing>
<property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="y_options"/>
+ <property name="top_attach">0</property>
</packing>
</child>
<child>
@@ -54,10 +52,19 @@
<property name="mnemonic_widget">eap_tls_user_cert_button</property>
</object>
<packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFileChooserButton" id="eap_tls_user_cert_button">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
<property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"/>
</packing>
</child>
<child>
@@ -70,24 +77,19 @@
<property name="mnemonic_widget">eap_tls_ca_cert_button</property>
</object>
<packing>
+ <property name="left_attach">0</property>
<property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"/>
</packing>
</child>
<child>
<object class="GtkFileChooserButton" id="eap_tls_ca_cert_button">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="hexpand">True</property>
</object>
<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="x_options">GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
@@ -95,17 +97,14 @@
<property name="label" translatable="yes">No CA certificate is _required</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
+ <property name="hexpand">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
</object>
<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="x_options">GTK_FILL</property>
- <property name="y_options"/>
</packing>
</child>
<child>
@@ -118,24 +117,19 @@
<property name="mnemonic_widget">eap_tls_private_key_button</property>
</object>
<packing>
+ <property name="left_attach">0</property>
<property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"/>
</packing>
</child>
<child>
<object class="GtkFileChooserButton" id="eap_tls_private_key_button">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="hexpand">True</property>
</object>
<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">GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
@@ -148,25 +142,21 @@
<property name="mnemonic_widget">eap_tls_private_key_password_entry</property>
</object>
<packing>
+ <property name="left_attach">0</property>
<property name="top_attach">5</property>
- <property name="bottom_attach">6</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"/>
</packing>
</child>
<child>
<object class="GtkEntry" id="eap_tls_private_key_password_entry">
<property name="visible">True</property>
<property name="can_focus">True</property>
+ <property name="hexpand">True</property>
<property name="visibility">False</property>
<property name="activates_default">True</property>
</object>
<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="y_options"/>
</packing>
</child>
<child>
@@ -174,31 +164,14 @@
<property name="label" translatable="yes">Sho_w password</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
+ <property name="hexpand">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
</object>
<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">GTK_FILL</property>
- <property name="y_options"/>
- </packing>
- </child>
- <child>
- <object class="GtkFileChooserButton" id="eap_tls_user_cert_button">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- </object>
- <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="x_options">GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
</packing>
</child>
</object>
diff --git a/panels/network/wireless-security/eap-method-ttls.ui b/panels/network/wireless-security/eap-method-ttls.ui
index 4047f9fc8..0b23c54ba 100644
--- a/panels/network/wireless-security/eap-method-ttls.ui
+++ b/panels/network/wireless-security/eap-method-ttls.ui
@@ -18,11 +18,9 @@
<property name="show_tabs">False</property>
<property name="show_border">False</property>
<child>
- <object class="GtkTable" id="table10">
+ <object class="GtkGrid" id="eap_ttls_grid">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="n_rows">4</property>
- <property name="n_columns">2</property>
<property name="column_spacing">6</property>
<property name="row_spacing">6</property>
<child>
@@ -35,20 +33,20 @@
<property name="mnemonic_widget">eap_ttls_anon_identity_entry</property>
</object>
<packing>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"/>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="eap_ttls_anon_identity_entry">
<property name="visible">True</property>
<property name="can_focus">True</property>
+ <property name="hexpand">True</property>
<property name="activates_default">True</property>
</object>
<packing>
<property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="y_options"/>
+ <property name="top_attach">0</property>
</packing>
</child>
<child>
@@ -61,24 +59,19 @@
<property name="mnemonic_widget">eap_ttls_ca_cert_button</property>
</object>
<packing>
+ <property name="left_attach">0</property>
<property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"/>
</packing>
</child>
<child>
<object class="GtkFileChooserButton" id="eap_ttls_ca_cert_button">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="hexpand">True</property>
</object>
<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="x_options">GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
@@ -87,38 +80,35 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
+ <property name="halign">start</property>
+ <property name="hexpand">True</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
</object>
<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="x_options">GTK_FILL</property>
- <property name="y_options"/>
</packing>
</child>
<child>
<object class="GtkLabel" id="eap_ttls_inner_auth_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">1</property>
- <property name="label" translatable="yes">_Inner authentication</property>
+ <property name="label" translatable="yes">_Inner authentication:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">eap_ttls_inner_auth_combo</property>
+ <property name="xalign">1</property>
</object>
<packing>
+ <property name="left_attach">0</property>
<property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"/>
- </packing>
- </child>
+ </packing>
+ </child>
<child>
<object class="GtkComboBox" id="eap_ttls_inner_auth_combo">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="hexpand">True</property>
<property name="model">model6</property>
<child>
<object class="GtkCellRendererText" id="renderer6"/>
@@ -129,11 +119,7 @@
</object>
<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="x_options">GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
@@ -146,10 +132,9 @@
</child>
</object>
<packing>
- <property name="right_attach">2</property>
+ <property name="left_attach">0</property>
<property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
- <property name="x_options">GTK_FILL</property>
+ <property name="width">2</property>
</packing>
</child>
</object>
--
2.13.5
From e48d32e5699d824dc229f131246229f077709f84 Mon Sep 17 00:00:00 2001
From: Jonathan Kang <jonathan121537@gmail.com>
Date: Tue, 19 Sep 2017 17:00:18 +0800
Subject: [PATCH 2/2] wifi: Add domain-suffix-match entry
domain-suffix-match has been supported in nm-connection-editor for a
while. So users can edit that property in nm-connection-editor. But
it's still not available in gnome-control-center yet.
Fix that by adding domain-suffix-match entry in tls, ttls and peap
security settings page.
https://bugzilla.gnome.org/show_bug.cgi?id=787882
---
panels/network/wireless-security/eap-method-peap.c | 21 ++++++++++
.../network/wireless-security/eap-method-peap.ui | 43 ++++++++++++++++----
panels/network/wireless-security/eap-method-tls.c | 29 ++++++++++++-
panels/network/wireless-security/eap-method-tls.ui | 47 +++++++++++++++++-----
panels/network/wireless-security/eap-method-ttls.c | 21 ++++++++++
.../network/wireless-security/eap-method-ttls.ui | 39 +++++++++++++++---
6 files changed, 175 insertions(+), 25 deletions(-)
diff --git a/panels/network/wireless-security/eap-method-peap.c b/panels/network/wireless-security/eap-method-peap.c
index 402887c87..e94c0ef4f 100644
--- a/panels/network/wireless-security/eap-method-peap.c
+++ b/panels/network/wireless-security/eap-method-peap.c
@@ -114,6 +114,10 @@ add_to_size_group (EAPMethod *parent, GtkSizeGroup *group)
g_assert (widget);
gtk_size_group_add_widget (group, widget);
+ widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_peap_domain_label"));
+ g_assert (widget);
+ gtk_size_group_add_widget (group, widget);
+
widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_peap_version_label"));
g_assert (widget);
gtk_size_group_add_widget (group, widget);
@@ -159,6 +163,12 @@ fill_connection (EAPMethod *parent, NMConnection *connection, NMSettingSecretFla
if (text && strlen (text))
g_object_set (s_8021x, NM_SETTING_802_1X_ANONYMOUS_IDENTITY, text, NULL);
+ widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_peap_domain_entry"));
+ g_assert (widget);
+ text = gtk_entry_get_text (GTK_ENTRY (widget));
+ if (text && strlen (text))
+ g_object_set (s_8021x, NM_SETTING_802_1X_DOMAIN_SUFFIX_MATCH, text, NULL);
+
widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_peap_ca_cert_button"));
g_assert (widget);
filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (widget));
@@ -424,11 +434,22 @@ eap_method_peap_new (WirelessSecurity *ws_parent,
(GCallback) wireless_security_changed_cb,
ws_parent);
+ widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_peap_domain_entry"));
+ if (s_8021x && nm_setting_802_1x_get_domain_suffix_match (s_8021x))
+ gtk_entry_set_text (GTK_ENTRY (widget), nm_setting_802_1x_get_domain_suffix_match (s_8021x));
+ g_signal_connect (G_OBJECT (widget), "changed",
+ (GCallback) wireless_security_changed_cb,
+ ws_parent);
+
if (secrets_only) {
widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_peap_anon_identity_label"));
gtk_widget_hide (widget);
widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_peap_anon_identity_entry"));
gtk_widget_hide (widget);
+ widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_peap_domain_label"));
+ gtk_widget_hide (widget);
+ widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_peap_domain_entry"));
+ gtk_widget_hide (widget);
widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_peap_ca_cert_label"));
gtk_widget_hide (widget);
widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_peap_ca_cert_button"));
diff --git a/panels/network/wireless-security/eap-method-peap.ui b/panels/network/wireless-security/eap-method-peap.ui
index 37dddd643..1f5e7e599 100644
--- a/panels/network/wireless-security/eap-method-peap.ui
+++ b/panels/network/wireless-security/eap-method-peap.ui
@@ -67,6 +67,33 @@
</packing>
</child>
<child>
+ <object class="GtkLabel" id="eap_peap_domain_label">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">_Domain:</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">eap_peap_domain_entry</property>
+ <property name="xalign">1</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="eap_peap_domain_entry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ <property name="activates_default">True</property>
+ <property name="tooltip_text" translatable="yes">Suffix of the server certificate name.</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">1</property>
+ </packing>
+ </child>
+ <child>
<object class="GtkLabel" id="eap_peap_ca_cert_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -77,7 +104,7 @@
</object>
<packing>
<property name="left_attach">0</property>
- <property name="top_attach">1</property>
+ <property name="top_attach">2</property>
</packing>
</child>
<child>
@@ -88,7 +115,7 @@
</object>
<packing>
<property name="left_attach">1</property>
- <property name="top_attach">1</property>
+ <property name="top_attach">2</property>
</packing>
</child>
<child>
@@ -103,7 +130,7 @@
</object>
<packing>
<property name="left_attach">1</property>
- <property name="top_attach">2</property>
+ <property name="top_attach">3</property>
</packing>
</child>
<child>
@@ -117,7 +144,7 @@
</object>
<packing>
<property name="left_attach">0</property>
- <property name="top_attach">3</property>
+ <property name="top_attach">4</property>
</packing>
</child>
<child>
@@ -135,7 +162,7 @@
</object>
<packing>
<property name="left_attach">1</property>
- <property name="top_attach">3</property>
+ <property name="top_attach">4</property>
</packing>
</child>
<child>
@@ -149,7 +176,7 @@
</object>
<packing>
<property name="left_attach">0</property>
- <property name="top_attach">4</property>
+ <property name="top_attach">5</property>
</packing>
</child>
<child>
@@ -167,7 +194,7 @@
</object>
<packing>
<property name="left_attach">1</property>
- <property name="top_attach">4</property>
+ <property name="top_attach">5</property>
</packing>
</child>
<child>
@@ -180,7 +207,7 @@
</object>
<packing>
<property name="left_attach">0</property>
- <property name="top_attach">5</property>
+ <property name="top_attach">6</property>
<property name="width">2</property>
</packing>
</child>
diff --git a/panels/network/wireless-security/eap-method-tls.c b/panels/network/wireless-security/eap-method-tls.c
index 8d17fa459..278e98364 100644
--- a/panels/network/wireless-security/eap-method-tls.c
+++ b/panels/network/wireless-security/eap-method-tls.c
@@ -148,6 +148,10 @@ add_to_size_group (EAPMethod *parent, GtkSizeGroup *group)
g_assert (widget);
gtk_size_group_add_widget (group, widget);
+ widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_tls_domain_label"));
+ g_assert (widget);
+ gtk_size_group_add_widget (group, widget);
+
widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_tls_user_cert_label"));
g_assert (widget);
gtk_size_group_add_widget (group, widget);
@@ -190,6 +194,12 @@ fill_connection (EAPMethod *parent, NMConnection *connection, NMSettingSecretFla
g_assert (widget);
g_object_set (s_8021x, NM_SETTING_802_1X_IDENTITY, gtk_entry_get_text (GTK_ENTRY (widget)), NULL);
+ widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_tls_domain_entry"));
+ g_assert (widget);
+ g_object_set (s_8021x,
+ parent->phase2 ? NM_SETTING_802_1X_PHASE2_DOMAIN_SUFFIX_MATCH : NM_SETTING_802_1X_DOMAIN_SUFFIX_MATCH,
+ gtk_entry_get_text (GTK_ENTRY (widget)), NULL);
+
/* TLS private key */
widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_tls_private_key_password_entry"));
g_assert (widget);
@@ -393,7 +403,7 @@ setup_filepicker (GtkBuilder *builder,
filter = eap_method_default_file_chooser_filter_new (privkey);
gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (widget), filter);
- /* For some reason, GTK+ calls set_current_filter (..., NULL) from
+ /* For some reason, GTK+ calls set_current_filter (..., NULL) from
* gtkfilechooserdefault.c::show_and_select_files_finished_loading() on our
* dialog; so force-reset the filter to what we want it to be whenever
* it gets cleared.
@@ -491,6 +501,19 @@ eap_method_tls_new (WirelessSecurity *ws_parent,
if (s_8021x && nm_setting_802_1x_get_identity (s_8021x))
gtk_entry_set_text (GTK_ENTRY (widget), nm_setting_802_1x_get_identity (s_8021x));
+ widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_tls_domain_entry"));
+ g_assert (widget);
+ g_signal_connect (G_OBJECT (widget), "changed",
+ (GCallback) wireless_security_changed_cb,
+ ws_parent);
+ if (phase2) {
+ if (s_8021x && nm_setting_802_1x_get_phase2_domain_suffix_match (s_8021x))
+ gtk_entry_set_text (GTK_ENTRY (widget), nm_setting_802_1x_get_phase2_domain_suffix_match (s_8021x));
+ } else {
+ if (s_8021x && nm_setting_802_1x_get_domain_suffix_match (s_8021x))
+ gtk_entry_set_text (GTK_ENTRY (widget), nm_setting_802_1x_get_domain_suffix_match (s_8021x));
+ }
+
setup_filepicker (parent->builder, "eap_tls_user_cert_button",
_("Choose your personal certificate"),
ws_parent, parent, s_8021x,
@@ -540,6 +563,10 @@ eap_method_tls_new (WirelessSecurity *ws_parent,
if (secrets_only) {
widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_tls_identity_entry"));
gtk_widget_set_sensitive (widget, FALSE);
+ widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_tls_domain_label"));
+ gtk_widget_hide (widget);
+ widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_tls_domain_entry"));
+ gtk_widget_hide (widget);
widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_tls_user_cert_label"));
gtk_widget_hide (widget);
widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_tls_user_cert_button"));
diff --git a/panels/network/wireless-security/eap-method-tls.ui b/panels/network/wireless-security/eap-method-tls.ui
index a399460fa..60fe59f06 100644
--- a/panels/network/wireless-security/eap-method-tls.ui
+++ b/panels/network/wireless-security/eap-method-tls.ui
@@ -43,6 +43,33 @@
</packing>
</child>
<child>
+ <object class="GtkLabel" id="eap_tls_domain_label">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">_Domain:</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">eap_tls_domain_entry</property>
+ <property name="xalign">1</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="eap_tls_domain_entry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ <property name="activates_default">True</property>
+ <property name="tooltip_text" translatable="yes">Suffix of the server certificate name.</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">1</property>
+ </packing>
+ </child>
+ <child>
<object class="GtkLabel" id="eap_tls_user_cert_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -53,7 +80,7 @@
</object>
<packing>
<property name="left_attach">0</property>
- <property name="top_attach">1</property>
+ <property name="top_attach">2</property>
</packing>
</child>
<child>
@@ -64,7 +91,7 @@
</object>
<packing>
<property name="left_attach">1</property>
- <property name="top_attach">1</property>
+ <property name="top_attach">2</property>
</packing>
</child>
<child>
@@ -78,7 +105,7 @@
</object>
<packing>
<property name="left_attach">0</property>
- <property name="top_attach">2</property>
+ <property name="top_attach">3</property>
</packing>
</child>
<child>
@@ -89,7 +116,7 @@
</object>
<packing>
<property name="left_attach">1</property>
- <property name="top_attach">2</property>
+ <property name="top_attach">3</property>
</packing>
</child>
<child>
@@ -104,7 +131,7 @@
</object>
<packing>
<property name="left_attach">1</property>
- <property name="top_attach">3</property>
+ <property name="top_attach">4</property>
</packing>
</child>
<child>
@@ -118,7 +145,7 @@
</object>
<packing>
<property name="left_attach">0</property>
- <property name="top_attach">4</property>
+ <property name="top_attach">5</property>
</packing>
</child>
<child>
@@ -129,7 +156,7 @@
</object>
<packing>
<property name="left_attach">1</property>
- <property name="top_attach">4</property>
+ <property name="top_attach">5</property>
</packing>
</child>
<child>
@@ -143,7 +170,7 @@
</object>
<packing>
<property name="left_attach">0</property>
- <property name="top_attach">5</property>
+ <property name="top_attach">6</property>
</packing>
</child>
<child>
@@ -156,7 +183,7 @@
</object>
<packing>
<property name="left_attach">1</property>
- <property name="top_attach">5</property>
+ <property name="top_attach">6</property>
</packing>
</child>
<child>
@@ -171,7 +198,7 @@
</object>
<packing>
<property name="left_attach">1</property>
- <property name="top_attach">6</property>
+ <property name="top_attach">7</property>
</packing>
</child>
</object>
diff --git a/panels/network/wireless-security/eap-method-ttls.c b/panels/network/wireless-security/eap-method-ttls.c
index 2d9de48d6..9cd2c205f 100644
--- a/panels/network/wireless-security/eap-method-ttls.c
+++ b/panels/network/wireless-security/eap-method-ttls.c
@@ -114,6 +114,10 @@ add_to_size_group (EAPMethod *parent, GtkSizeGroup *group)
g_assert (widget);
gtk_size_group_add_widget (group, widget);
+ widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_ttls_domain_label"));
+ g_assert (widget);
+ gtk_size_group_add_widget (group, widget);
+
widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_ttls_inner_auth_label"));
g_assert (widget);
gtk_size_group_add_widget (group, widget);
@@ -154,6 +158,12 @@ fill_connection (EAPMethod *parent, NMConnection *connection, NMSettingSecretFla
if (text && strlen (text))
g_object_set (s_8021x, NM_SETTING_802_1X_ANONYMOUS_IDENTITY, text, NULL);
+ widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_ttls_domain_entry"));
+ g_assert (widget);
+ text = gtk_entry_get_text (GTK_ENTRY (widget));
+ if (text && strlen (text))
+ g_object_set (s_8021x, NM_SETTING_802_1X_DOMAIN_SUFFIX_MATCH, text, NULL);
+
widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_ttls_ca_cert_button"));
g_assert (widget);
filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (widget));
@@ -451,6 +461,13 @@ eap_method_ttls_new (WirelessSecurity *ws_parent,
(GCallback) wireless_security_changed_cb,
ws_parent);
+ widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_ttls_domain_entry"));
+ if (s_8021x && nm_setting_802_1x_get_domain_suffix_match (s_8021x))
+ gtk_entry_set_text (GTK_ENTRY (widget), nm_setting_802_1x_get_domain_suffix_match (s_8021x));
+ g_signal_connect (G_OBJECT (widget), "changed",
+ (GCallback) wireless_security_changed_cb,
+ ws_parent);
+
widget = inner_auth_combo_init (method, connection, s_8021x, secrets_only);
inner_auth_combo_changed_cb (widget, (gpointer) method);
@@ -459,6 +476,10 @@ eap_method_ttls_new (WirelessSecurity *ws_parent,
gtk_widget_hide (widget);
widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_ttls_anon_identity_entry"));
gtk_widget_hide (widget);
+ widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_ttls_domain_label"));
+ gtk_widget_hide (widget);
+ widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_ttls_domain_entry"));
+ gtk_widget_hide (widget);
widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_ttls_ca_cert_label"));
gtk_widget_hide (widget);
widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_ttls_ca_cert_button"));
diff --git a/panels/network/wireless-security/eap-method-ttls.ui b/panels/network/wireless-security/eap-method-ttls.ui
index 0b23c54ba..c679cdf0b 100644
--- a/panels/network/wireless-security/eap-method-ttls.ui
+++ b/panels/network/wireless-security/eap-method-ttls.ui
@@ -50,6 +50,33 @@
</packing>
</child>
<child>
+ <object class="GtkLabel" id="eap_ttls_domain_label">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">_Domain:</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">eap_ttls_domain_entry</property>
+ <property name="xalign">1</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="eap_ttls_domain_entry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ <property name="activates_default">True</property>
+ <property name="tooltip_text" translatable="yes">Suffix of the server certificate name.</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">1</property>
+ </packing>
+ </child>
+ <child>
<object class="GtkLabel" id="eap_ttls_ca_cert_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -60,7 +87,7 @@
</object>
<packing>
<property name="left_attach">0</property>
- <property name="top_attach">1</property>
+ <property name="top_attach">2</property>
</packing>
</child>
<child>
@@ -71,7 +98,7 @@
</object>
<packing>
<property name="left_attach">1</property>
- <property name="top_attach">1</property>
+ <property name="top_attach">2</property>
</packing>
</child>
<child>
@@ -87,7 +114,7 @@
</object>
<packing>
<property name="left_attach">1</property>
- <property name="top_attach">2</property>
+ <property name="top_attach">3</property>
</packing>
</child>
<child>
@@ -101,7 +128,7 @@
</object>
<packing>
<property name="left_attach">0</property>
- <property name="top_attach">3</property>
+ <property name="top_attach">4</property>
</packing>
</child>
<child>
@@ -119,7 +146,7 @@
</object>
<packing>
<property name="left_attach">1</property>
- <property name="top_attach">3</property>
+ <property name="top_attach">4</property>
</packing>
</child>
<child>
@@ -133,7 +160,7 @@
</object>
<packing>
<property name="left_attach">0</property>
- <property name="top_attach">4</property>
+ <property name="top_attach">5</property>
<property name="width">2</property>
</packing>
</child>
--
2.13.5