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
This commit is contained in:
Beniamino Galvani
2016-05-03 23:39:40 +02:00
parent 0175056a6d
commit f57c205051

View File

@@ -98,6 +98,10 @@ nm_vpn_get_secret_names (const char *vpn_type)
{ {
const char *type; const char *type;
static VpnPasswordName generic_vpn_secrets[] = { {"password", N_("Password")}, {NULL, NULL} }; 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")}, static VpnPasswordName vpnc_secrets[] = { {"Xauth password", N_("Password")},
{"IPSec secret", N_("Group password")}, {"IPSec secret", N_("Group password")},
{NULL, NULL} }; {NULL, NULL} };
@@ -117,13 +121,14 @@ nm_vpn_get_secret_names (const char *vpn_type)
else else
type = vpn_type; type = vpn_type;
if ( !g_strcmp0 (type, "openvpn") if ( !g_strcmp0 (type, "pptp")
|| !g_strcmp0 (type, "pptp")
|| !g_strcmp0 (type, "iodine") || !g_strcmp0 (type, "iodine")
|| !g_strcmp0 (type, "ssh") || !g_strcmp0 (type, "ssh")
|| !g_strcmp0 (type, "l2tp") || !g_strcmp0 (type, "l2tp")
|| !g_strcmp0 (type, "fortisslvpn")) || !g_strcmp0 (type, "fortisslvpn"))
return generic_vpn_secrets; return generic_vpn_secrets;
else if (!g_strcmp0 (type, "openvpn"))
return openvpn_secrets;
else if (!g_strcmp0 (type, "vpnc")) else if (!g_strcmp0 (type, "vpnc"))
return vpnc_secrets; return vpnc_secrets;
else if ( !g_strcmp0 (type, "openswan") else if ( !g_strcmp0 (type, "openswan")