mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-02 18:10:26 +01:00
2008-09-30 Dan Williams <dcbw@redhat.com>
* properties/nm-openvpn-dialog.glade - Fix the User and CA certificate entries in Password TLS mode, they were swapped with their labels (rh #464765) - Move private key password entries below private key chooser - Rename "Certificate Password" to "Private key password" since that's what they actually are * properties/auth-helpers.c - (fill_password): s/cert_password/priv_key_password/s - (fill_vpn_passwords): fix up for corrected widget names; fix mis-filling of pw_tls secret widgets where passwords were reversed - (auth_widget_save_secrets): fix up for corrected widget names * src/nm-openvpn-service.c - s/certpass/priv_key_pass/s becuase that's what it is git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4127 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
parent
97f6070cfd
commit
c4f2dc6acf
4 changed files with 1165 additions and 2046 deletions
|
|
@ -1,3 +1,21 @@
|
|||
2008-09-30 Dan Williams <dcbw@redhat.com>
|
||||
|
||||
* properties/nm-openvpn-dialog.glade
|
||||
- Fix the User and CA certificate entries in Password TLS mode, they
|
||||
were swapped with their labels (rh #464765)
|
||||
- Move private key password entries below private key chooser
|
||||
- Rename "Certificate Password" to "Private key password" since that's
|
||||
what they actually are
|
||||
|
||||
* properties/auth-helpers.c
|
||||
- (fill_password): s/cert_password/priv_key_password/s
|
||||
- (fill_vpn_passwords): fix up for corrected widget names; fix mis-filling
|
||||
of pw_tls secret widgets where passwords were reversed
|
||||
- (auth_widget_save_secrets): fix up for corrected widget names
|
||||
|
||||
* src/nm-openvpn-service.c
|
||||
- s/certpass/priv_key_pass/s becuase that's what it is
|
||||
|
||||
2008-09-29 Dan Williams <dcbw@redhat.com>
|
||||
|
||||
Patch from Robert Buchholz <rbu@gentoo.org>
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ static GtkWidget *
|
|||
fill_password (GladeXML *xml,
|
||||
const char *widget_name,
|
||||
NMConnection *connection,
|
||||
gboolean cert_password)
|
||||
gboolean priv_key_password)
|
||||
{
|
||||
GtkWidget *widget;
|
||||
GtkWidget *show_passwords;
|
||||
|
|
@ -76,7 +76,7 @@ fill_password (GladeXML *xml,
|
|||
const char *tmp;
|
||||
|
||||
tmp = g_hash_table_lookup (s_vpn->secrets,
|
||||
cert_password ? NM_OPENVPN_KEY_CERTPASS : NM_OPENVPN_KEY_PASSWORD);
|
||||
priv_key_password ? NM_OPENVPN_KEY_CERTPASS : NM_OPENVPN_KEY_PASSWORD);
|
||||
if (tmp)
|
||||
password = gnome_keyring_memory_strdup (tmp);
|
||||
}
|
||||
|
|
@ -86,7 +86,7 @@ fill_password (GladeXML *xml,
|
|||
|
||||
s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION));
|
||||
password = keyring_helpers_lookup_secret (s_con->uuid,
|
||||
cert_password ? NM_OPENVPN_KEY_CERTPASS : NM_OPENVPN_KEY_PASSWORD,
|
||||
priv_key_password ? NM_OPENVPN_KEY_CERTPASS : NM_OPENVPN_KEY_PASSWORD,
|
||||
&unused);
|
||||
}
|
||||
|
||||
|
|
@ -109,15 +109,15 @@ fill_vpn_passwords (GladeXML *xml,
|
|||
GtkWidget *w = NULL;
|
||||
|
||||
if (!strcmp (contype, NM_OPENVPN_CONTYPE_TLS))
|
||||
w = fill_password (xml, "tls_cert_password_entry", connection, TRUE);
|
||||
w = fill_password (xml, "tls_private_key_password_entry", connection, TRUE);
|
||||
else if (!strcmp (contype, NM_OPENVPN_CONTYPE_PASSWORD))
|
||||
w = fill_password (xml, "pw_password_entry", connection, FALSE);
|
||||
else if (!strcmp (contype, NM_OPENVPN_CONTYPE_PASSWORD_TLS)) {
|
||||
GtkWidget *w2 = NULL;
|
||||
|
||||
w = fill_password (xml, "pw_tls_password_entry", connection, TRUE);
|
||||
w = fill_password (xml, "pw_tls_password_entry", connection, FALSE);
|
||||
|
||||
w2 = fill_password (xml, "pw_tls_cert_password_entry", connection, FALSE);
|
||||
w2 = fill_password (xml, "pw_tls_private_key_password_entry", connection, TRUE);
|
||||
if (w2) {
|
||||
gtk_size_group_add_widget (group, w2);
|
||||
g_signal_connect (w2, "changed", G_CALLBACK (changed_cb), user_data);
|
||||
|
|
@ -558,12 +558,12 @@ auth_widget_save_secrets (GladeXML *xml,
|
|||
gboolean ret;
|
||||
|
||||
if (!strcmp (contype, NM_OPENVPN_CONTYPE_TLS))
|
||||
ret = save_secret (xml, "tls_cert_password_entry", uuid, name, NM_OPENVPN_KEY_CERTPASS);
|
||||
ret = save_secret (xml, "tls_private_key_password_entry", uuid, name, NM_OPENVPN_KEY_CERTPASS);
|
||||
else if (!strcmp (contype, NM_OPENVPN_CONTYPE_PASSWORD))
|
||||
ret = save_secret (xml, "pw_password_entry", uuid, name, NM_OPENVPN_KEY_PASSWORD);
|
||||
else if (!strcmp (contype, NM_OPENVPN_CONTYPE_PASSWORD_TLS)) {
|
||||
ret = save_secret (xml, "pw_tls_password_entry", uuid, name, NM_OPENVPN_KEY_PASSWORD);
|
||||
ret = save_secret (xml, "pw_tls_cert_password_entry", uuid, name, NM_OPENVPN_KEY_CERTPASS);
|
||||
ret = save_secret (xml, "pw_tls_private_key_password_entry", uuid, name, NM_OPENVPN_KEY_CERTPASS);
|
||||
} else if (!strcmp (contype, NM_OPENVPN_CONTYPE_STATIC_KEY))
|
||||
/* No secrets here */
|
||||
ret = TRUE;
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -62,7 +62,7 @@ G_DEFINE_TYPE (NMOpenvpnPlugin, nm_openvpn_plugin, NM_TYPE_VPN_PLUGIN)
|
|||
typedef struct {
|
||||
char *username;
|
||||
char *password;
|
||||
char *certpass;
|
||||
char *priv_key_pass;
|
||||
GIOChannel *socket_channel;
|
||||
guint socket_channel_eventid;
|
||||
} NMOpenvpnPluginIOData;
|
||||
|
|
@ -298,11 +298,11 @@ handle_management_socket (NMVPNPlugin *plugin,
|
|||
} else
|
||||
nm_warning ("Auth requested but one of username or password is missing");
|
||||
} else if (!strcmp (auth, "Private Key")) {
|
||||
if (io_data->certpass) {
|
||||
if (io_data->priv_key_pass) {
|
||||
char *qpass;
|
||||
|
||||
/* Quote strings passed back to openvpn */
|
||||
qpass = ovpn_quote_string (io_data->certpass);
|
||||
qpass = ovpn_quote_string (io_data->priv_key_pass);
|
||||
buf = g_strdup_printf ("password \"%s\" \"%s\"\n", auth, qpass);
|
||||
memset (qpass, 0, strlen (qpass));
|
||||
g_free (qpass);
|
||||
|
|
@ -312,7 +312,7 @@ handle_management_socket (NMVPNPlugin *plugin,
|
|||
g_io_channel_flush (source, NULL);
|
||||
g_free (buf);
|
||||
} else
|
||||
nm_warning ("Certificate password requested but certpass == NULL");
|
||||
nm_warning ("Certificate password requested but private key password == NULL");
|
||||
} else {
|
||||
nm_warning ("No clue what to send for username/password request for '%s'", auth);
|
||||
if (out_failure)
|
||||
|
|
@ -815,7 +815,7 @@ nm_openvpn_start_openvpn_binary (NMOpenvpnPlugin *plugin,
|
|||
io_data->password = tmp ? g_strdup (tmp) : NULL;
|
||||
|
||||
tmp = g_hash_table_lookup (secrets, NM_OPENVPN_KEY_CERTPASS);
|
||||
io_data->certpass = tmp ? g_strdup (tmp) : NULL;
|
||||
io_data->priv_key_pass = tmp ? g_strdup (tmp) : NULL;
|
||||
|
||||
priv->io_data = io_data;
|
||||
|
||||
|
|
@ -904,7 +904,7 @@ real_need_secrets (NMVPNPlugin *plugin,
|
|||
|
||||
connection_type = get_connection_type (s_vpn->data);
|
||||
if (!strcmp (connection_type, NM_OPENVPN_CONTYPE_PASSWORD_TLS)) {
|
||||
/* Will require a password and maybe certificate password */
|
||||
/* Will require a password and maybe private key password */
|
||||
if (!g_hash_table_lookup (s_vpn->secrets, NM_OPENVPN_KEY_CERTPASS))
|
||||
need_secrets = TRUE;
|
||||
|
||||
|
|
@ -915,7 +915,7 @@ real_need_secrets (NMVPNPlugin *plugin,
|
|||
if (!g_hash_table_lookup (s_vpn->secrets, NM_OPENVPN_KEY_PASSWORD))
|
||||
need_secrets = TRUE;
|
||||
} else if (!strcmp (connection_type, NM_OPENVPN_CONTYPE_TLS)) {
|
||||
/* May require certificate password */
|
||||
/* May require private key password */
|
||||
if (!g_hash_table_lookup (s_vpn->secrets, NM_OPENVPN_KEY_CERTPASS))
|
||||
need_secrets = TRUE;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue