Richard Levitte [Fri, 1 Nov 2002 12:37:22 +0000 (12:37 +0000)]
Depend on OPENSSL_NO_STATIC_ENGINE rather than OPENSSL_NO_DYNAMIC_ENGINE.
Make sure to include openssl/opensslconf.h to make sure we get the
definition of those macros.
Richard Levitte [Tue, 29 Oct 2002 09:42:59 +0000 (09:42 +0000)]
The #else part of the conditionals have two statements, so they need
to be surrounded with braces, or the surrounding if..else will fail
miserably in case the #else part is compiled.
Geoff Thorpe [Tue, 29 Oct 2002 00:33:04 +0000 (00:33 +0000)]
Correct and enhance the behaviour of "internal" session caching as it
relates to SSL_CTX flags and the use of "external" session caching. The
existing flag, "SSL_SESS_CACHE_NO_INTERNAL_LOOKUP" remains but is
supplemented with a complimentary flag, "SSL_SESS_CACHE_NO_INTERNAL_STORE".
The bitwise OR of the two flags is also defined as
"SSL_SESS_CACHE_NO_INTERNAL" and is the flag that should be used by most
applications wanting to implement session caching *entirely* by its own
provided callbacks. As the documented behaviour contradicted actual
behaviour up until recently, and since that point behaviour has itself been
inconsistent anyway, this change should not introduce any compatibility
problems. I've adjusted the relevant documentation to elaborate about how
this works.
Kudos to "Nadav Har'El" <nyh@math.technion.ac.il> for diagnosing these
anomalies and testing this patch for correctness.
Richard Levitte [Thu, 24 Oct 2002 17:02:27 +0000 (17:02 +0000)]
There's a name clash between OpenSSL and RSAref. Since this engine handles
RSAref data, pretend we don't care for OpenSSL's MD2 and MD5 structures or
implementation.
Remove all kinds of silly warning
Richard Levitte [Thu, 24 Oct 2002 10:03:55 +0000 (10:03 +0000)]
On certain platforms, we redefine certain symbols using macros in
apps.h. For those, it's better to include apps.h after the system
headers where those symbols may be defined, since there's otherwise a
chance that the C compiler will barf when it sees something that looks
like this after expansion:
int VMS_strcasecmp((str1),(str2))(const char *, const char *);
Geoff Thorpe [Fri, 18 Oct 2002 20:45:38 +0000 (20:45 +0000)]
If dynamically-loadable ENGINEs are linked against a shared-library version
of libcrypto, then it is possible that when they are loaded they will share
the same static data as the loading application/library. This means it will
be too late to set memory/ERR/ex_data/[etc] callbacks, but entirely
unnecessary to try. This change puts a static variable in the core ENGINE
code (contained in libcrypto) and a function returning a pointer to it. If
the loaded ENGINE's return value from this function matches the loading
application/library's return value - they share static data. If they don't
match, the loaded ENGINE has its own copy of libcrypto's static data and so
the callbacks need to be set.
Also, although 0.9.7 hasn't been released yet, it's clear this will
introduce a binary incompatibility between dynamic ENGINEs built for 0.9.7
and 0.9.8 (though others probably exist already from EC_*** hooks and
what-not) - so the version control values are correspondingly bumped.
Geoff Thorpe [Wed, 16 Oct 2002 21:50:28 +0000 (21:50 +0000)]
The ENGINE implementations in ./engines/ should be role models on how to
write external engines (and thus should require only installed openssl
headers and libs to compile without warnings). So this gets rid of recently
introduced compilation warnings (no longer including internal headers) by
including string.h directly.
Geoff Thorpe [Wed, 16 Oct 2002 01:29:37 +0000 (01:29 +0000)]
- Remo Inverardi noticed that ENGINEs don't have an "up_ref" function in the
normal 'structural' case (ENGINE_init() satisfies this in the less normal
'functional' case). This change provides such a function.
- Correct some "read" locks that should actually be "write" locks.
Richard Levitte [Mon, 14 Oct 2002 09:24:50 +0000 (09:24 +0000)]
Add missing quotes.
Make sure test doesn't barf because of missing spaces before the
closing ].
Add -lc to the list of libraries we depend upon. Not always
necessary, but never hurts.
Richard Levitte [Sun, 13 Oct 2002 22:57:51 +0000 (22:57 +0000)]
Targeting the solaris platform for specific tests. Something is going
wrong, and my test engine doesn't show it. The verbosity will be
temporary for about a day.
Richard Levitte [Fri, 11 Oct 2002 18:51:29 +0000 (18:51 +0000)]
Step 12 of move of engines: Time to make the changes to support
automatic load of dynamic engines. Make the changes in the main
Makefile so the engines are built, but now in the engines/ directory.
Note: The changes in step 12 have all been made by Geoff Thorpe.
Credit where credit is due.
Richard Levitte [Fri, 11 Oct 2002 18:49:55 +0000 (18:49 +0000)]
Step 11c of move of engines: Time to make the changes to support
automatic load of dynamic engines. Change the iterator to try to load
the requested engine dynamically. The environment variable
OPENSSL_ENGINES can be used to override the internal default directory
where one can expect to find dynamically loadable engines.
Note: The changes in step 11 have all been made by Geoff Thorpe.
Credit where credit is due.
Richard Levitte [Fri, 11 Oct 2002 18:47:51 +0000 (18:47 +0000)]
Step 11b of move of engines: Time to make the changes to support
automatic load of dynamic engines. Add functionality to the dynamic
engine to handle engine directories and loading from those. This
is currently NOT compatible with the use of LD_LIBRARY_PATH and
similar environment variables.
Note: The changes in step 11 have all been made by Geoff Thorpe.
Credit where credit is due.
Richard Levitte [Fri, 11 Oct 2002 18:42:54 +0000 (18:42 +0000)]
Step 11a of move of engines: Time to make the changes to support
automatic load of dynamic engines. Unless we don't have shared
library support, do not try to load any "built-in" engines except for
cryptodev.
Richard Levitte [Fri, 11 Oct 2002 18:40:47 +0000 (18:40 +0000)]
Step 10 of move of engines: Change crypto/engine/Makefile.ssl so we
don't build any "built-in" engines in that directory any more, except
fo the cryptodev one.
Richard Levitte [Fri, 11 Oct 2002 18:06:08 +0000 (18:06 +0000)]
Step 6 of move of engines: rename the macro ENGINE_DYNAMIC_SUPPORT to
OPENSSL_NO_DYNAMIC_ENGINE and make sure that gets defined unless
shared library support has been specifically requested.