I'm trying to avoid passing any C-runtime objects (such as a FILE*)
across the OpenSSL DLL boundary.  This is unsafe as the two DLLs may
be using different runtime instances which causes crashes on Windows.
Apparently using BIO_new_file is a safe way to pass a file to a
function as the FILE* is created and remains on the OpenSSL side of
the border.  Does this make sense?

Also, I came across the OPENSSL_NO_FP_API preprocessor definition
which seemed to prevent accidentally calling an API function that
allowed unsafe FILE* passing.  However, I notice that BIO_new_file
isn't defined if OPENSSL_NO_FP_API is.  And I can't actually get the
OpenSSL headers to work with this defined at all:
In file included from openssl.h:46,
                 from libssh2_priv.h:136,
                 from channel.c:40:
/usr/include/openssl/pem.h:657: error: expected ')' before 'RSA'
/usr/include/openssl/pem.h:668: error: expected ')' before 'DSA'
/usr/include/openssl/pem.h:673: error: expected ')' before 'EC_GROUP'
/usr/include/openssl/pem.h:680: error: expected ')' before 'DH'

Is there some magic required to define this properly?

Many thanks.

Alex Lamaison
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to