This worked for me:
The usual reason for this is that you are on Windoze and haven't set the
multi threaded DLL runtime library option. See INSTALL.W32
-----Original Message-----
From: Dr Stephen Henson [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 14, 2000 8:24 PM
To: [EMAIL PROTECTED]
Subject: Re: BIO_write call crashes...
Grebelsky, Konstantin wrote:
>
> I have tried a number of things:
> X509_print_fp
> PEM_write_X509
> PEM_write_DSAPrivateKey
>
> all of these crash when they get to fwrite in file_write in bss_file.c
> They crash when fwrite tries to lock the stream...
> Does anybody know why this is happening? All this of course inside my code
> all openssl staff works just fine.
> Is there something I am not setting?
The usual reason for this is that you are on Windoze and haven't set the
multi threaded DLL runtime library option. See INSTALL.W32
Steve.
--
Dr Stephen N. Henson. http://www.drh-consultancy.demon.co.uk/
Personal Email: [EMAIL PROTECTED]
Senior crypto engineer, Celo Communications: http://www.celocom.com/
Core developer of the OpenSSL project: http://www.openssl.org/
Business Email: [EMAIL PROTECTED] PGP key: via homepage.
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]
-----Original Message-----
From: jose antonio garvayo [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 20, 2000 4:58 AM
To: [EMAIL PROTECTED]
Subject: Problem with BIO functions in VC++ 6.0
Hello:
I compiled openssl-0.9.5 for Visual C++,following the
instructions of Andrew Gray, and everything looks work
fine; but I encounter a problem with the BIO functions
that I can resolve. Here is the code:
#include <stdio.h>
#include <openssl/ssl.h>
int main() {
pBioErr= BIO_new_fp(stderr,BIO_NOCLOSE);
fwrite("Hello world\n", 11, 1, pBioErr->ptr);
BIO_printf(pBioErr, "Hello, world\n");
return(1);
};
The program crash in BIO_printf(...), with the next
call stack:
NTDLL! 77f7ce4c()
NTDLL! 77f77586()
fwrite(const void * 0x0012f70c, unsigned int 6,
unsigned int 1, _iobuf * 0x00422a98) line 72 + 9 bytes
file_write(bio_st * 0x009c1fb0, char * 0x0012f70c, int
6) line 172 + 23 bytes
BIO_write(bio_st * 0x009c1fb0, const char *
0x0012f70c, int 6) line 197 + 20 bytes
BIO_printf(bio_st * 0x009c1fb0) line 95 + 20 bytes
main(int 1, char * * 0x00ad0e90) line 25 + 14 bytes
mainCRTStartup() line 206 + 25 bytes
KERNEL32! 77f1b9ea()
And the debug window display this:
Loaded 'D:\WINNT\System32\ntdll.dll', no matching
symbolic information found.
Loaded symbols for
'C:\Pruebas\openssl-0.9.5\out32dll\Debug\libeay32.dll'
Loaded 'D:\WINNT\system32\WSOCK32.DLL', no matching
symbolic information found.
Loaded 'D:\WINNT\system32\KERNEL32.DLL', no matching
symbolic information found.
Loaded 'D:\WINNT\system32\WS2_32.DLL', no matching
symbolic information found.
Loaded symbols for 'D:\WINNT\system32\MSVCRT.DLL'
Loaded 'D:\WINNT\system32\USER32.DLL', no matching
symbolic information found.
Loaded 'D:\WINNT\system32\GDI32.DLL', no matching
symbolic information found.
Loaded 'D:\WINNT\system32\ADVAPI32.DLL', no matching
symbolic information found.
Loaded 'D:\WINNT\system32\RPCRT4.DLL', no matching
symbolic information found.
Loaded 'D:\WINNT\system32\WS2HELP.DLL', no matching
symbolic information found.
Loaded symbols for 'D:\WINNT\system32\MSVCRTD.DLL'
First-chance exception in leaks.exe (NTDLL.DLL):
0xC0000005: Access Violation.
I think its very strange that the same function call
(fwrite) with the same parameters that works in
main(), fails in file_write(). Maybe is a problem with
the settings of the compilation, because the utility
applications (openssl, etc) works ok.
Anyone could help me?
Thanks in advance.
_______________________________________________________________
Do You Yahoo!?
Consiga gratis su direcci�n @yahoo.es en http://correo.yahoo.es
______________________________________________________________________
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]