mingw32 patch
David Woodhouse
dwmw2 at infradead.org
Thu Feb 6 12:05:08 EST 2014
On Sat, 2013-12-21 at 13:09 +0100, Nikos Mavrogiannopoulos wrote:
> Hello,
> Attached is a patch for openconnect to compile under mingw32.
Thanks. All this, and a little more to update it to current HEAD, is now
committed.
> That takes care the compilation, but I'm not sure whether the tun
> handling is sufficient.
It isn't. There's a fair amount more which needs to be done to use the
tun device under Windows. See
https://github.com/ndpgroup/vpnc/blob/master/sysdep.c#L162
We can't lift code from vpnc because OpenConnect is LGPL not GPL.
There's some Win32 tun/tap code in http://i3.cs.berkeley.edu/ and it
might be worth asking what their licence is; it's not clear.
Reimplementing it from scratch shouldn't be impossible but I probably
lack the wit to do it for myself without copying.
If I bypass that issue though, with the following patch...
diff --git a/main.c b/main.c
index 9d246b1..6c1e0fb 100644
--- a/main.c
+++ b/main.c
@@ -1020,7 +1020,7 @@ int main(int argc, char **argv)
}
} else
#endif
- if (openconnect_setup_tun_device(vpninfo, vpnc_script, ifname)) {
+ if (0 && openconnect_setup_tun_device(vpninfo, vpnc_script, ifname)) {
fprintf(stderr, _("Set up tun device failed\n"));
openconnect_vpninfo_free(vpninfo);
exit(1);
... I can make connections under wine. If I use OpenSSL I get DTLS
connections. If I use GnuTLS (Fedora's mingw32-gnutls 3.1.16 package) it
just says:
DTLS handshake failed: Error in the pull function.
(It does send a UDP packet and receive a response, but openconnect has
closed the socket before the response comes in).
The pull function isn't even being called.
--
dwmw2
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5745 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openconnect-devel/attachments/20140206/81a3ca83/attachment.bin>
More information about the openconnect-devel
mailing list