Re: Application crashes when SSL is used - more info
maybe see if grabbing the openssl dlls from another win32 app stops it crashing ... also try setting your ftp app to use the vc multithread dll crt (as apposed to single threaded or static linked lib) Louis Solomon www.SteelBytes.com - Original Message - From: Sitaram [EMAIL PROTECTED] To: openssl-users@openssl.org Sent: Friday, May 06, 2005 7:13 PM Subject: Application crashes when SSL is used - more info Hi! We customized the FTPServer written by thirt party. This FTPServer is used to to transfer the files from Scanner to the host PC. FTPClient is installed in Scanner. We recently added the SSL support to the FTPServer program using the OpenSSL library. The FTPServer implemented using VC7. The library is built the using SSL Library 0.9.7g. Perl for Win32 and NASM are used to build. The options no-idea no-mdc2 no-rc5 are set while doing the build. When I am trying to transfer a file from an FTPClient, my application crashes after the file is transferred. It displays the following message Microsoft Visual C++ Runtime Library dialog pops up and says Buffer overrun detected! When I have debugged for the following error, I found the call stack pointing to libeay32.dll I have taken a snap of the screen at that time. I am attaching please look into it. I have enabled Buffer Security Check option while compiling my program. Then It started working in Windows2000 workstation. But When I tried transferring files in Win98, the application crashes. It gives an error like Exception in 03h module Kernel32.dll. This exception happend only if I try to transfer files that are larger than 1Mb in size Please help to resolve this problem. When I am trying to transfer a file in unencrypted form, the application works smoothly. But when I transfer the file in encrypted mode, where SSL_read is used to get the encrypted data, the application crashes. I have run Bounds Checker to make sure that my code does not give any error. Thanks Regards, Seetharam Sitaram, Sharp Software Development India, Level 3, Innovator, ITPL, Bangalore. Telephone: Res# 25525196 Mob# 94488 53090 - Yahoo! Mail Stay connected, organized, and protected. Take the tour __ OpenSSL Project http://www.openssl.org User Support Mailing Listopenssl-users@openssl.org Automated List Manager [EMAIL PROTECTED]
openssl-0.9.7g: using zlib1.dll on win32
line 55 of crypto\comp\c_zlib.c defines Z_CALLCONV as _stdcall, yet the default calling convention for zlib 1.2.2 is _cdecl (well, it's actually not sepcified, which == compiler default, which in VC == _cdecl) see line 210 of zonf.h. so either Z_CALLCONV has to be changed to blank/undefined/_cdecl or use zlibCompileFlags() to determine if zlib was compiled with cdecl or stdapi/winapi Louis Solomon www.SteelBytes.com __ OpenSSL Project http://www.openssl.org User Support Mailing Listopenssl-users@openssl.org Automated List Manager [EMAIL PROTECTED]
Re: compiling openssl with zlib support on win32
louis Hmm, I wouldn't be surprised if we've forgotten to unload the shared louis library for zlib, and thereby created that leak. Note that the leak louis isn't very important, and a one-time thingy. It's not like it's going louis to grow over time. louis louis but are you sure? or is this just a guess. For now, it's just a guess. while it's just a guess, I'll stick without zlib support. I guess this will be resolved by the next release ? Louis Solomon www.SteelBytes.com __ OpenSSL Project http://www.openssl.org User Support Mailing Listopenssl-users@openssl.org Automated List Manager [EMAIL PROTECTED]
compiling openssl with zlib support on win32
Hi, I'm trying to compile openssl (0.9.7f) with zlib (1.2.2) support using VisualStudio 2003. Here's what I am doing ... add -DZLIB to end of $cflags in utils\pl\vc-32.pl then from a VisualC++ command shell: cd base_of_openssl_source set path=%path%;c:\cygwin\bin (this is for the perl interpreter) perl Configure VC-WIN32 threads zlib zlib-dynamic ms\do_masm.bat place zlib .h files in inc32 nmake -f ms\ntdll.mak I then stick zlib1.dll in the out32 folder, and run ssltest -zlib and I get the following output TLSv1, cipher TLSv1/SSLv3 DHE-RSA-AES256-SHA, 512 bit RSA [12:13:53] 1675 file=.\crypto\dso\dso_lib.c, line=380, thread=1816, number=6, address=00972580 [12:13:53] 1672 file=.\crypto\dso\dso_lib.c, line=103, thread=1816, number=36, address=0099A0A0 [12:13:53] 1674 file=.\crypto\stack\stack.c, line=126, thread=1816, number=16, address=0099A170 [12:13:53] 1673 file=.\crypto\stack\stack.c, line=124, thread=1816, number=20, address=0099A110 [12:13:53] 1676 file=.\crypto\dso\dso_win32.c, line=262, thread=1816, number=10, address=0099A208 [12:13:53] 1677 file=.\crypto\dso\dso_win32.c, line=132, thread=1816, number=4, address=00972570 92 bytes leaked in 6 chunks if I do all the above without the references to zlib, then I don't get the above leak msgs, but I also don't get zlib :-( Louis Solomon www.SteelBytes.com __ OpenSSL Project http://www.openssl.org User Support Mailing Listopenssl-users@openssl.org Automated List Manager [EMAIL PROTECTED]
Re: compiling openssl with zlib support on win32
Hmm, I wouldn't be surprised if we've forgotten to unload the shared library for zlib, and thereby created that leak. Note that the leak isn't very important, and a one-time thingy. It's not like it's going to grow over time. but are you sure? or is this just a guess. Louis Solomon www.SteelBytes.com __ OpenSSL Project http://www.openssl.org User Support Mailing Listopenssl-users@openssl.org Automated List Manager [EMAIL PROTECTED]
Re: is SSL_CTX_new() thread safe (on win32) ?
I just tested with 0.9.7 beta 4, and it still happens. any ideas ? Louis Solomon www.SteelBytes.com - Original Message - From: Louis Solomon [SteelBytes] [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, November 26, 2002 4:10 PM Subject: Re: is SSL_CTX_new() thread safe (on win32) ? whoops :-) there was a typo in the url, it should be http://www.steelbytes.com/temp/openssl_bug_test.zip Louis Solomon www.SteelBytes.com - Original Message - From: Louis Solomon [SteelBytes] [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, November 25, 2002 12:29 PM Subject: is SSL_CTX_new() thread safe (on win32) ? When running this test program I wrote, I _sometimes_ get an error return by SSL_CTX_new(). The error msg is: SSL routines:SSL_CTX_new:library has no ciphers Louis Solomon [EMAIL PROTECTED] source and binaries of test program avail from: http://www.steeelbytes.com/temp/openssl_bug_test.zip openssl versions tested with: 0.9.6g compiled by me (src from openssl.org) 0.9.6g binaries from bsdftpd-ssl.sc.ru 0.9.6d binaries from mod-ssl.org test enviroment: winxp pro sp1 dual P3 733Mhz + 768MB ram compiler: visual studio .net pseudo code: main_thread() { init ssl (dyanmically linked with LoadLibrary and GetProcAddress) success = 0; create a heap of worker threads wait for work threads clean up ssl if (success!=num_threads) show error else show success } worker_thread() { ssl_meth = SSLv23_method(); ssl_ctx = SSL_CTX_new(ssl_meth); if (ssl_ctx!=NULL) { SSL_CTX_free(ssl_ctx); success++; } else { log ssl error to debug output } } __ OpenSSL Project http://www.openssl.org User Support Mailing List[EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED] __ OpenSSL Project http://www.openssl.org User Support Mailing List[EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED]