Thans for your comments. There are some things that have to be explained before I'll make the changes, please read bellow.

Alon Bar-Lev napsal(a):
On 3/12/08, Mirek Zajic <za...@nextsoft.cz> wrote:
Hello,
 I have finally made some changes to the NTLMv2 patch according to Alon's
 comments. Now it should also be architecture independent.

 Miroslav Zajic
 NextSoft s.r.o.

Hi!
Great!
Some more comments... :)

 +    timestamp_ull = openvpn_time(NULL);
 +    timestamp_ull = (timestamp_ull + UINT64(11644473600)) *
 UINT64(10000000);

Just noticed that openvpn has: openvpn_gettimeofday() which works also
for WIN32... Maybe use this one?

openvpn_time works fine, why to change?
 +    msg_buf[sb_offset + 5] = (unsigned char)((*msg_bufpos & 0xff00) >> 8);

always & such with 0xff.
Please explain, I don't understand
diff -Naur openvpn-2.1/ntlm.h openvpn-NTLMv2-predelane-2.1/ntlm.h
 --- openvpn-2.1/ntlm.h    2008-01-13 21:25:52.935292800 +0100
 +++ openvpn-NTLMv2-predelane-2.1/ntlm.h    2008-03-12 11:35:36.296875000
 +0100
 @@ -3,6 +3,18 @@

  #if NTLM

 +/* 64bit datatype macros */
 +#ifdef _MSC_VER
 +    /* MS compilers */
 +#define UINTEGER64 __int64
 +#define UINT64(c) c ## Ui64
 +#else
 +    /* Non MS compilers */
 +#define UINTEGER64 unsigned long long
 +#define UINT64(c) c ## LL
 +#endif
 +


Why not use long long for both platforms, it is already used in common.h...
Also you can use ull suffix for both platforms.

Anyway... this belongs to the .c file, it is not used by any other files.
But I don't think it is required at all.

Alon.
Some Microsoft compilers doesn't support long long, but they support __int64. The same is with LL/Ui64 postfix. I think that this is correct. But I'm not sure about the location. Maybe that it should be placed in some common header (common.h?) for further usage by other modules.

Thanks
Miroslav Zajic
NextSoft s.r.o.

Reply via email to