From 367727ae881c307defdf977be85294335a0d06fd Mon Sep 17 00:00:00 2001 From: Beniamino Galvani Date: Tue, 3 May 2016 23:39:40 +0200 Subject: [PATCH] clients: add missing openvpn secret types to secret agent Add support for asking a certificate password and a HTTP proxy password for openvpn connections to the built-in secret agent. https://bugzilla.gnome.org/show_bug.cgi?id=765553 (cherry picked from commit f57c20505110b951d067b9232ad7dcc2e6b50125) --- clients/common/nm-vpn-helpers.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/clients/common/nm-vpn-helpers.c b/clients/common/nm-vpn-helpers.c index 1d2a6b0f81..880b6ecdd7 100644 --- a/clients/common/nm-vpn-helpers.c +++ b/clients/common/nm-vpn-helpers.c @@ -99,6 +99,10 @@ nm_vpn_get_secret_names (const char *vpn_type) { const char *type; static VpnPasswordName generic_vpn_secrets[] = { {"password", N_("Password")}, {NULL, NULL} }; + static VpnPasswordName openvpn_secrets[] = { {"password", N_("Password")}, + {"cert-pass", N_("Certificate password")}, + {"http-proxy-password", N_("HTTP proxy password")}, + {NULL, NULL} }; static VpnPasswordName vpnc_secrets[] = { {"Xauth password", N_("Password")}, {"IPSec secret", N_("Group password")}, {NULL, NULL} }; @@ -118,13 +122,14 @@ nm_vpn_get_secret_names (const char *vpn_type) else type = vpn_type; - if ( !g_strcmp0 (type, "openvpn") - || !g_strcmp0 (type, "pptp") + if ( !g_strcmp0 (type, "pptp") || !g_strcmp0 (type, "iodine") || !g_strcmp0 (type, "ssh") || !g_strcmp0 (type, "l2tp") || !g_strcmp0 (type, "fortisslvpn")) return generic_vpn_secrets; + else if (!g_strcmp0 (type, "openvpn")) + return openvpn_secrets; else if (!g_strcmp0 (type, "vpnc")) return vpnc_secrets; else if ( !g_strcmp0 (type, "openswan")