On Wed, Jan 12, 2000 at 12:00:00AM +0000, Per Nilsson wrote:

> There's a similar problem that I ran into when I wanted to use the debug dll
> version of the runtime library: Things like file handles will also be different.
> So this following piece of code will crash:
> 
> fp=fopen(cert_file,"rb");
> b=BIO_new_fp(fp,0);
> cert=d2i_X509_bio(b,0); <== This will crash in NTDLL.DLL

I was suspicious about things like that -- and then there's this (now
removed) note in INSTALL.W32 saying about the original SSLeay
instructions that "some of this may be out of date and no longer
applicable.  In particular the Crypto_malloc_init() comment appears to
be wrong: you always need to use the same runtime library as the DLL
itself", which would mean that Crypto_malloc_init() is not needed
after all.  I recently asked for information on this but no-one
replied.

> Replacing the first two with BIO_new_file(cert_file,"rb") works, but what
> I really wanted to do was to use _fsopen to get thread-safe access to a file
> that might get updated any time by another thread.
> 
> So I propose that a new function be added to OpenSSL:
> BIO_new_shared_file(char *filename,char *mode)
> where mode can contain sharing modes as well as the normal r/w modes etc.

To my knowledge, there's no portable concept of "sharing modes".
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to