Hi,

When building openSSL on Windows with:

*       CONFIG=VC-WIN64A or CONFIG=VC-WIN32
*       no-shared no-threads -DWINVER==0x0501 -D_CRT_NON_CONFORMING_SWPRINTFS
*       With Visual Studio 2005

I get dependencies to user32.dll, when using libeay32.lib, e.g:

2>libeay32.lib(rand_win.obj) : error LNK2001: unresolved external symbol 
__imp__delet...@4
2>libeay32.lib(rand_win.obj) : error LNK2001: unresolved external symbol 
__imp__deleteobj...@4
2>libeay32.lib(rand_win.obj) : error LNK2001: unresolved external symbol 
__imp__getbitmapb...@12
2>libeay32.lib(rand_win.obj) : error LNK2001: unresolved external symbol 
__imp__bit...@36
2>libeay32.lib(rand_win.obj) : error LNK2001: unresolved external symbol 
__imp__getobje...@12
2>libeay32.lib(rand_win.obj) : error LNK2001: unresolved external symbol 
__imp__selectobj...@8
2>libeay32.lib(rand_win.obj) : error LNK2001: unresolved external symbol 
__imp__createcompatiblebit...@12
2>libeay32.lib(rand_win.obj) : error LNK2001: unresolved external symbol 
__imp__getdevicec...@8
2>libeay32.lib(rand_win.obj) : error LNK2001: unresolved external symbol 
__imp__createcompatibl...@4
2>libeay32.lib(rand_win.obj) : error LNK2001: unresolved external symbol 
__imp__create...@16
2>libeay32.lib(cryptlib.obj) : error LNK2001: unresolved external symbol 
__imp__getuserobjectinformati...@20
2>libeay32.lib(cryptlib.obj) : error LNK2001: unresolved external symbol 
__imp__getprocesswindowstat...@0
2>libeay32.lib(cryptlib.obj) : error LNK2001: unresolved external symbol 
__imp__getdesktopwin...@0
2>libeay32.lib(cryptlib.obj) : error LNK2001: unresolved external symbol 
__imp__messageb...@16

These dependencies are unwanted for our application, since using user32.dll 
will result in Windows desktop exhaustion if too many users are logged in to a 
Windows system (via a service) and use our application.
I would like to have an option to prevent any interaction to UI (user32.dll) 
related code. Can you please add such option?

As far as I could see, the code in rand_win.c/cryptlib.c are related to:
- OPENSSL_isservice(), which uses GetDesktopWindow(), 
GetProcessWindowStation(), GetUserObjectInformationW()
- and a number of functions in rand_win.c e.g. readscreen()
- readscreen() seems to be used only in RAND_SCREEN() and has some comments 
that the function exists only for backward compatibility. If this compatibility 
can be turned off, much of the dependencies to user32.dll are removed then.

I don't know how to fix this. But I would like to share some thoughts:
*       Windows 2008/Vista does not allow to call MessageBox() if the calling 
process is a service (and running in session 0). So MessageBox() is only useful 
if a normal user, connected to an interactive Windows Desktop, will call 
openssl executables.
*       I saw a lot of NT4 code. It may be worth to consider that Windows 2000 
is not supported by Microsoft anymore for many years (see 
http://support.microsoft.com/lifecycle/?p1=3071). You may like to drop some 
ancient Windows flavors? It will save code too, e.g. dynamically loading DLLs 
on e.g. Windows 9x variants (also very ancient).
*       Background information on desktop exhaustion: 
http://blogs.msdn.com/ntdebugging/archive/2007/01/04/desktop-heap-overview.aspx 
and http://blogs.technet.com/markrussinovich/archive/2010/02/24/3315174.aspx

Met vriendelijke groet/Best regards,

Kees Dekker | senior software engineer, ERP LN Development | Infor |
Baron van Nagellstraat 89 | 3771 LK Barneveld | Phone +31 (0)342 428706 | Fax 
+31 (0)342 428796 | E-mail [email protected]



Hi,
 
When building openSSL on Windows with:
 
  • CONFIG=VC-WIN64A or CONFIG=VC-WIN32
  • no-shared no-threads -DWINVER==0x0501 -D_CRT_NON_CONFORMING_SWPRINTFS
  • With Visual Studio 2005
 
I get dependencies to user32.dll, when using libeay32.lib, e.g:
 
2>libeay32.lib(rand_win.obj) : error LNK2001: unresolved external symbol __imp__delet...@4
2>libeay32.lib(rand_win.obj) : error LNK2001: unresolved external symbol __imp__deleteobj...@4
2>libeay32.lib(rand_win.obj) : error LNK2001: unresolved external symbol __imp__getbitmapb...@12
2>libeay32.lib(rand_win.obj) : error LNK2001: unresolved external symbol __imp__bit...@36
2>libeay32.lib(rand_win.obj) : error LNK2001: unresolved external symbol __imp__getobje...@12
2>libeay32.lib(rand_win.obj) : error LNK2001: unresolved external symbol __imp__selectobj...@8
2>libeay32.lib(rand_win.obj) : error LNK2001: unresolved external symbol __imp__createcompatiblebit...@12
2>libeay32.lib(rand_win.obj) : error LNK2001: unresolved external symbol __imp__getdevicec...@8
2>libeay32.lib(rand_win.obj) : error LNK2001: unresolved external symbol __imp__createcompatibl...@4
2>libeay32.lib(rand_win.obj) : error LNK2001: unresolved external symbol __imp__create...@16
2>libeay32.lib(cryptlib.obj) : error LNK2001: unresolved external symbol __imp__getuserobjectinformati...@20
2>libeay32.lib(cryptlib.obj) : error LNK2001: unresolved external symbol __imp__getprocesswindowstat...@0
2>libeay32.lib(cryptlib.obj) : error LNK2001: unresolved external symbol __imp__getdesktopwin...@0
2>libeay32.lib(cryptlib.obj) : error LNK2001: unresolved external symbol __imp__messageb...@16
 
These dependencies are unwanted for our application, since using user32.dll will result in Windows desktop exhaustion if too many users are logged in to a Windows system (via a service) and use our application.
I would like to have an option to prevent any interaction to UI (user32.dll) related code. Can you please add such option?
 
As far as I could see, the code in rand_win.c/cryptlib.c are related to:
- OPENSSL_isservice(), which uses GetDesktopWindow(), GetProcessWindowStation(), GetUserObjectInformationW()
- and a number of functions in rand_win.c e.g. readscreen()
- readscreen() seems to be used only in RAND_SCREEN() and has some comments that the function exists only for backward compatibility. If this compatibility can be turned off, much of the dependencies to user32.dll are removed then.
 
I don't know how to fix this. But I would like to share some thoughts:
 
Met vriendelijke groet/Best regards,
 
Kees Dekker | senior software engineer, ERP LN Development | Infor |
Baron van Nagellstraat 89 | 3771 LK Barneveld | Phone +31 (0)342 428706 | Fax +31 (0)342 428796 | E-mail [email protected]
 
 

Reply via email to