Richard Levitte - VMS Whacker wrote:
>
> From: Dr S N Henson <[EMAIL PROTECTED]>
>
> drh> > definitions for the Win32 case. Of course, what you say above means
> drh> > that OPENSSL_EXTERN will have different values depending on if you're
> drh> > building the DLL or using it. That's pretty easy to do if we use a
> drh> > macro BUILD_SHLIB as a flag. Of course, if any other DLL needs to
> drh> > reexport OpenSSL symbols (is that what you meant?), it wll have to
> drh> > defined BUILD_SHLIB as well...
> drh> >
> drh>
> drh> Well the issue with additional DLLs is that they may need to import some
> drh> variables defined in OpenSSL and export some of their own which the new
> drh> ASN1 macros create. So the stuff in the OpenSSL headers needs to be the
> drh> import declaration whereas stuff in the additional DLLs headers needs to
> drh> be the export declaration when the DLL is being built.
>
> Ah, that makes things simpler. But it would probably be smart to use
> the name OPENSSL_BUILD_SHLIB instead of just BUILD_SHLIB :-).
>
Well the relevant functions and variables are declared with a macro:
DECLARE_ASN1_FUNCTIONS(SOME_ASN1_THING)
this appears in some OpenSSL headers. It may also appear in some
external DLL headers if they declare their own ASN1 modules. AFAICs this
means the OpenSSL header version has to import variables and the DLL
header export them when the external DLL is built. When the external DLL
is being linked to everything is import.
Hmmm... I'll have to think about this a bit more.
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
Development Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]