NetworkManager r4033 - trunk/vpn-daemons/openvpn/src



Author: dcbw
Date: Thu Sep  4 15:00:13 2008
New Revision: 4033
URL: http://svn.gnome.org/viewvc/NetworkManager?rev=4033&view=rev

Log:
Don't need secrets in static key mode

Modified:
   trunk/vpn-daemons/openvpn/src/nm-openvpn-service.c

Modified: trunk/vpn-daemons/openvpn/src/nm-openvpn-service.c
==============================================================================
--- trunk/vpn-daemons/openvpn/src/nm-openvpn-service.c	(original)
+++ trunk/vpn-daemons/openvpn/src/nm-openvpn-service.c	Thu Sep  4 15:00:13 2008
@@ -822,8 +822,11 @@
 	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),



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