Re: two small openvpn fixes



Jon Escombe wrote:
4) Mandatory check for a secret that fails with a x509 certs only.

Can you try out the attached patch?

-casey

Index: vpn-daemons/openvpn/auth-dialog/main.c
===================================================================
--- vpn-daemons/openvpn/auth-dialog/main.c	(revision 3154)
+++ vpn-daemons/openvpn/auth-dialog/main.c	(working copy)
@@ -386,8 +386,10 @@
 
 	exit_status = 0;
 
-	if (!info.need_password && !info.need_certpass)
+	if (!info.need_password && !info.need_certpass) {
+		printf ("%s\n%s\n\n\n", NM_OPENVPN_KEY_NOSECRET, "true");
 		goto out;
+	}
 
 	if (get_passwords (&info, retry)) {
 		if (info.need_password)
Index: vpn-daemons/openvpn/src/nm-openvpn-service.h
===================================================================
--- vpn-daemons/openvpn/src/nm-openvpn-service.h	(revision 3154)
+++ vpn-daemons/openvpn/src/nm-openvpn-service.h	(working copy)
@@ -66,6 +66,7 @@
 
 #define NM_OPENVPN_KEY_PASSWORD "password"
 #define NM_OPENVPN_KEY_CERTPASS "cert-pass"
+#define NM_OPENVPN_KEY_NOSECRET "no-secret"
 
 typedef struct {
 	NMVPNPlugin parent;


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