Under mingw32:
I managed to by pass the 95 only code, but I don't know how it will affect the
RAND_poll() function, I believe the behaviour changes. I conditionally comment
out the offensive code. (attached is my patch)
The patch is against CVS version 1.9 of the file rand_win.c.


But I encounter the following error while building it:

Building OpenSSL
cp ./crypto/buildinf.h tmp/buildinf.h
cp ./crypto/opensslconf.h outinc/openssl/opensslconf.h
as -o tmp/m5-win32.o ./crypto/md5/asm/m5-win32.s
as -o tmp/s1-win32.o ./crypto/sha/asm/s1-win32.s
as -o tmp/rm-win32.o ./crypto/ripemd/asm/rm-win32.s
as -o tmp/r4-win32.o ./crypto/rc4/asm/r4-win32.s
as -o tmp/r5-win32.o ./crypto/rc5/asm/r5-win32.s
rem out/libcrypto.a
process_begin: CreateProcess((null), rem out/libcrypto.a, ...) failed.
make (e=2): The system cannot find the file specified.
make: *** [out/libcrypto.a] Error 2

Still looking for the cause, do you have any clue on it?

-- 
(~._.~)  Öì Ⱥ Ó¢  (Qun-Ying)          (65) 874-6743
 ( O )   TrustCopy Pte Ltd / Kent Ridge Digital Labs
()~*~()  21 Heng Mui Keng Terrace,  Singapore 119613
(_)-(_)    [EMAIL PROTECTED]  *  [EMAIL PROTECTED]
--- org/rand_win.c      Thu Sep 14 13:35:56 2000
+++ rand/rand_win.c     Thu Sep 14 14:00:32 2000
@@ -119,7 +119,10 @@
 # define _WIN32_WINNT 0x0400
 #endif
 #include <wincrypt.h>
+#if defined(WIN32_WINDOWS) || (_WIN32_WINNT >= 0x0500)
+#define _USE_TLHELP32_H
 #include <tlhelp32.h>
+#endif
 
 /* Intel hardware RNG CSP -- available from
  * http://developer.intel.com/design/security/rng/redist_license.htm
@@ -148,6 +151,7 @@
 typedef BOOL (WINAPI *GETCURSORINFO)(PCURSORINFO);
 typedef DWORD (WINAPI *GETQUEUESTATUS)(UINT);
 
+#ifdef _USE_TLHELP32_H
 typedef HANDLE (WINAPI *CREATETOOLHELP32SNAPSHOT)(DWORD, DWORD);
 typedef BOOL (WINAPI *HEAP32FIRST)(LPHEAPENTRY32, DWORD, DWORD);
 typedef BOOL (WINAPI *HEAP32NEXT)(LPHEAPENTRY32);
@@ -155,6 +159,7 @@
 typedef BOOL (WINAPI *PROCESS32)(HANDLE, LPPROCESSENTRY32);
 typedef BOOL (WINAPI *THREAD32)(HANDLE, LPTHREADENTRY32);
 typedef BOOL (WINAPI *MODULE32)(HANDLE, LPMODULEENTRY32);
+#endif
 
 int RAND_poll(void)
 {
@@ -256,7 +261,7 @@
                        RAND_add(&w, sizeof(w), 0);
                        }
                }
-
+#ifdef _USE_TLHELP32_H
        /* Toolhelp32 snapshot: enumerate processes, threads, modules and heap
         * http://msdn.microsoft.com/library/psdk/winbase/toolhelp_5pfd.htm
         * (Win 9x only, not available on NT)
@@ -352,6 +357,7 @@
                        CloseHandle(handle);
                        }
                }
+#endif         
 
 #ifdef DEBUG
        printf("Exiting RAND_poll\n");

Reply via email to