On Mon, Sep 26, 2005, Katie Lucas wrote: > > > Hello. We've been looking at using OpenSSL for various comms things; > we've prototyped the code on UNIX and I've started moving it over to > Windows. > > We're using the binary distributions from Shining Light for Windows > compiling with Borland C++ Builder 6.0 , the source version from > OpenSSL.org for Linux. Linux works peachy. > > PEM_read_X509 crashes. Now, I know this is a fairly well known thing, > and people said to go do the locking (which I did) and faff about with > the applink bit (which is a pain) but eventually that all seems sorted. > >
Well the FAQ doesn't mention locking... The usual cause of this is a runtime library conflict. Some compilers (VC++ in particular) have different runtime libraries for debugging and multi-threading. If the OpenSSL shared library is linked with one runtime library version and the application uses another this can cause a conflict. One particular area which can cause problems is stdio usage which you've hit there with fgets(). The usual solution is make sure you use the same runtime library version with OpenSSL DLLs and your application. The applink code is another alternative, though I haven't tried that myself. Steve. -- Dr Stephen N. Henson. Email, S/MIME and PGP keys: see homepage OpenSSL project core developer and freelance consultant. Funding needed! Details on homepage. Homepage: http://www.drh-consultancy.demon.co.uk ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager [EMAIL PROTECTED]