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. PEM_read_X509 still crashes. I've been pulling code out of the source tree and installing it in the project so I can debug it, and I've eventually narrowed it down to the calls in bss_file... the part where it calls "bgets" through the BIO method pointer. I can call BIO_read() without any problem, but BIO_gets() takes ages and then protection faults. I can see nothing wrong with the method that ought to be being called through that pointer so I pull that in to the project, set the pointers up for it... and everything works. So I have my own copy of "int file_gets(BIO *bp, char *buf, int size)" and before I call PEM_read_X509 I say; BIO_s_file()->bgets = file_gets; and now instead of crashing, the certificate loads fine. The only alteration is that now "file_gets" lives in the app instead of the statically linked library. My question is, is this part of some known issue that I've missed finding the documentation for? Or is this some sort of bizarre effect of the Borland link/calling conventions? Cheers for any help! ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager [EMAIL PROTECTED]