Re: [Openvpn-devel] [PATCH v2] use the underscore version of stat on Windows

2012-02-16 Thread Alon Bar-Lev
Again, All conditional statements should be within single config.h or config-msvc.h or sysheader.h or anything. Doing conditional inline makes code complex and unmaintainable. But as you adds lng patches without proper review I guess it is not that important. Alon. On Thu, Feb 16, 2012 at

Re: [Openvpn-devel] [PATCH v2] use the underscore version of stat on Windows

2012-02-16 Thread Gert Doering
Hi, On Thu, Feb 16, 2012 at 07:47:25PM +0100, David Sommerseth wrote: > From: Heiko Hund > > MSVC does not know wstat(). Instead _wstat() must be used here. > Unfortunately _wstat() takes a 'struct _stat'. A type 'stat_t' is > introduced to handle this situation in a portable way. > > [v2: Use

[Openvpn-devel] [PATCH v2] use the underscore version of stat on Windows

2012-02-16 Thread David Sommerseth
From: Heiko Hund MSVC does not know wstat(). Instead _wstat() must be used here. Unfortunately _wstat() takes a 'struct _stat'. A type 'stat_t' is introduced to handle this situation in a portable way. [v2: Use openvpn_stat_t instead of stat_t (David Sommerseth)] Signed-off-by: Heiko Hund Sign

Re: [Openvpn-devel] [PATCH 4/4] make MSVC link against shell32 as well

2012-02-16 Thread Alon Bar-Lev
On Thu, Feb 16, 2012 at 7:30 PM, Heiko Hund wrote: > Windows API CommandLineToArgvW(), introduced in Windows unicode path > commit 71bbbd76c62630c88441237d72fe5b61f0b45b2a, is defined therein. Usually this should be avoided and get command-line from wmain().

Re: [Openvpn-devel] [PATCH 2/4] do not use mode_t on Windows

2012-02-16 Thread Alon Bar-Lev
I stopped following all OpenVPN changes. It seems like more changes are entered than should without proper review. Anyway, this is not the correct solution. Correct solution is to have config-msvc.h and have: --- #define mode_t int --- And in autoconf (if mingw does not have this as well): AC_CHE

Re: [Openvpn-devel] [PATCH 3/4] use the underscore version of stat on Windows

2012-02-16 Thread Gert Doering
Hi, On Thu, Feb 16, 2012 at 06:30:40PM +0100, Heiko Hund wrote: > MSVC does not know wstat(). Instead _wstat() must be used here. > Unfortunately _wstat() takes a 'struct _stat'. A type 'stat_t' is > introduced to handle this situation in a portable way. Semi-ACK. In general, ACK, though it mi

Re: [Openvpn-devel] [PATCH 2/4] do not use mode_t on Windows

2012-02-16 Thread Gert Doering
Hi, On Thu, Feb 16, 2012 at 06:30:39PM +0100, Heiko Hund wrote: > The MSVC headers do not define mode_t. open() uses an int for > the permissions instead. Fixes building with the MSVC based > buildsystem. ACK. (I was slightly worried that this might break mingw building, but David assures me tha

Re: [Openvpn-devel] [PATCH 1/4] replace check for TARGET_WIN32 with WIN32

2012-02-16 Thread Gert Doering
Hi, On Thu, Feb 16, 2012 at 06:30:38PM +0100, Heiko Hund wrote: > Use of TARGET_WIN32 breaks MSVC builds as it is only defined > for mingw builds done with the autotools buildsystem. ACK. I think it's reasonable to have exactly one CPP symbol to identify "building in the windows 32bit environme

Re: [Openvpn-devel] [PATCH 4/4] make MSVC link against shell32 as well

2012-02-16 Thread Gert Doering
Hi, On Thu, Feb 16, 2012 at 06:30:41PM +0100, Heiko Hund wrote: > Windows API CommandLineToArgvW(), introduced in Windows unicode path > commit 71bbbd76c62630c88441237d72fe5b61f0b45b2a, is defined therein. > > Signed-off-by: Heiko Hund Since you've tested it and it makes Samuli happy -> ACK :-)

[Openvpn-devel] [PATCH 4/4] make MSVC link against shell32 as well

2012-02-16 Thread Heiko Hund
Windows API CommandLineToArgvW(), introduced in Windows unicode path commit 71bbbd76c62630c88441237d72fe5b61f0b45b2a, is defined therein. Signed-off-by: Heiko Hund --- win/msvc.mak.in |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/win/msvc.mak.in b/win/msvc.mak.in inde

[Openvpn-devel] [PATCH 2/4] do not use mode_t on Windows

2012-02-16 Thread Heiko Hund
The MSVC headers do not define mode_t. open() uses an int for the permissions instead. Fixes building with the MSVC based buildsystem. Signed-off-by: Heiko Hund --- misc.h |2 +- win32.c |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/misc.h b/misc.h index 8c0bae1.

[Openvpn-devel] [PATCH 3/4] use the underscore version of stat on Windows

2012-02-16 Thread Heiko Hund
MSVC does not know wstat(). Instead _wstat() must be used here. Unfortunately _wstat() takes a 'struct _stat'. A type 'stat_t' is introduced to handle this situation in a portable way. Signed-off-by: Heiko Hund --- misc.h |6 -- pf.c|2 +- win32.c |4 ++-- 3 files changed, 7

[Openvpn-devel] MSVC fixes

2012-02-16 Thread Heiko Hund
Hi, this patch series fixes several issues when building for Windows with the MSVC buildsystem discovered today: [PATCH 1/4] replace check for TARGET_WIN32 with WIN32 [PATCH 2/4] do not use mode_t on Windows [PATCH 3/4] use the underscore version of stat on Windows [PATCH 4/4] make MSVC link agai

[Openvpn-devel] [PATCH 1/4] replace check for TARGET_WIN32 with WIN32

2012-02-16 Thread Heiko Hund
Use of TARGET_WIN32 breaks MSVC builds as it is only defined for mingw builds done with the autotools buildsystem. Signed-off-by: Heiko Hund --- misc.c|6 +++--- misc.h|6 +++--- openvpn.c |2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/misc.c b/misc.c i

Re: [Openvpn-devel] Cipher problem on Mac OS X

2012-02-16 Thread Freek Dijkstra
Frank de Brabander wrote: > Below I have included a patch that changes the bool return type to an int. > This will result in 'make check' to pass. I see that you already committed this. % cd openvpn % make distclean % git pull % git checkout 6449a149f850e9e1207233f3ca642d9342fbfbaf % autoreconf

Re: [Openvpn-devel] Cipher problem on Mac OS X

2012-02-16 Thread David Sommerseth
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 16/02/12 15:00, Frank de Brabander wrote: > Sorry, patch format got broken in previous email. Hope this works > better. No worries, patches is tricky in quite some MUAs. Anyhow, patch is applied to master on -testing and -stable trees. commit 644

Re: [Openvpn-devel] Cipher problem on Mac OS X

2012-02-16 Thread Frank de Brabander
Sorry, patch format got broken in previous email. Hope this works better. 0001-Fixed-wrong-return-type-of-cipher_kt_mode.patch Description: 0001-Fixed-wrong-return-type-of-cipher_kt_mode.patch

Re: [Openvpn-devel] Obfuscation for Iran SSL blocking

2012-02-16 Thread Samuli Seppänen
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Jun, I would try David's obfsproxy + OpenVPN suggestion first and reconsider if that fails. If we would add obfuscation into OpenVPN itself, we'd soon be in the same cat and mouse game as Tor, with the exception we don't have the same amount of de

Re: [Openvpn-devel] Cipher problem on Mac OS X

2012-02-16 Thread Adriaan de Jong
> -Original Message- > From: Frank de Brabander [mailto:braban...@fox-it.com] > > Hello, > > I have looked into the problem, it seems to be caused by the return > type of cipher_kt_mode() in crypto_backend.h being declared as a bool. > This function is called from init_key_type() of crypt

Re: [Openvpn-devel] Cipher problem on Mac OS X

2012-02-16 Thread Frank de Brabander
Hello, I have looked into the problem, it seems to be caused by the return type of cipher_kt_mode() in crypto_backend.h being declared as a bool. This function is called from init_key_type() of crypto.c during the tests. The actual mode value in cipher_kt_mode() of openssl_backend.c during the fai