[NetworkManager-libreswan] Moved remoteid property from IKEv2 to global properties



commit 73732be383805a77605aef82227572ac03c64edd
Author: Jochen Jägers <jochen jaegers gmail com>
Date:   Sat Sep 15 14:56:24 2018 +0200

    Moved remoteid property from IKEv2 to global properties
    
    Configuration of remoteid can also be necessary for connections
    using IKEv1. remoteid_label and remoteid_entry are permanent visible now and
    value is written to connection on "update_connection"

 properties/nm-libreswan-editor.c | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)
---
diff --git a/properties/nm-libreswan-editor.c b/properties/nm-libreswan-editor.c
index 56c84b9..20f4dc8 100644
--- a/properties/nm-libreswan-editor.c
+++ b/properties/nm-libreswan-editor.c
@@ -123,7 +123,6 @@ contype_combo_changed_cb (GtkWidget *combo, gpointer user_data)
                                        "show_passwords_checkbutton",
                                        NULL };
        const char *ikev2_widgets[] = { "cert_label", "cert_entry",
-                                       "remoteid_label", "remoteid_entry",
                                        NULL };
        const char **widget_show;
        const char **widget_hide;
@@ -532,12 +531,6 @@ update_connection (NMVpnEditor *iface,
                if (str && *str)
                        nm_setting_vpn_add_data_item (s_vpn, NM_LIBRESWAN_KEY_LEFTCERT, str);
 
-               /* Remote ID */
-               widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "remoteid_entry"));
-               str = gtk_entry_get_text (GTK_ENTRY (widget));
-               if (str && *str)
-                       nm_setting_vpn_add_data_item (s_vpn, NM_LIBRESWAN_KEY_RIGHTID, str);
-
                /* For now just enforce retrieving the local id from the certificate.
                 * We will allow to change this when we will refactore the "advanced"
                 * section and will expose the "leftid" parameter there.
@@ -575,6 +568,12 @@ update_connection (NMVpnEditor *iface,
                break;
        }
 
+       /* Remote ID */
+       widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "remoteid_entry"));
+       str = gtk_entry_get_text (GTK_ENTRY (widget));
+       if (str && *str)
+               nm_setting_vpn_add_data_item (s_vpn, NM_LIBRESWAN_KEY_RIGHTID, str);
+
        /* Phase 1 Algorithms: ike */
        widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "phase1_entry"));
        str = gtk_entry_get_text (GTK_ENTRY (widget));


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]