From 72e6d9181691e7b8d7a532476c3fc3b211e39ee4 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Thu, 4 Sep 2008 15:00:13 +0000 Subject: [PATCH] Don't need secrets in static key mode git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4033 4912f4e0-d625-0410-9fb7-b9a5a253dbdc --- vpn-daemons/openvpn/src/nm-openvpn-service.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/vpn-daemons/openvpn/src/nm-openvpn-service.c b/vpn-daemons/openvpn/src/nm-openvpn-service.c index a63b6b425a..7dba2ce69a 100644 --- a/vpn-daemons/openvpn/src/nm-openvpn-service.c +++ b/vpn-daemons/openvpn/src/nm-openvpn-service.c @@ -822,8 +822,11 @@ real_connect (NMVPNPlugin *plugin, if (!nm_openvpn_properties_validate (s_vpn->data, error)) return FALSE; - if (!nm_openvpn_properties_validate (s_vpn->secrets, error)) - return FALSE; + /* Static Key doesn't need secrets; the rest do */ + if (strcmp (connection_type, NM_OPENVPN_CONTYPE_STATIC_KEY)) { + if (!nm_openvpn_properties_validate (s_vpn->secrets, error)) + return FALSE; + } /* Finally try to start OpenVPN */ if (!nm_openvpn_start_openvpn_binary (NM_OPENVPN_PLUGIN (plugin),