On Fri, Mar 30, 2001, Geoff Thorpe wrote:

> I've just taken a look at mod_ssl-2.8.2 (I had skipped over 2.8.1 which is
> unfortunate, as this relates to 2.8.1 also).
> 
> Ralf, you mentioned in the ChangeLog that you'd updated mod_ssl to build/run
> with 0.9.7-dev snapshots of OpenSSL. However, the configuration stuff for
> enabling ENGINE support (pkg.sslmod/libssl.module: line 369) uses a test on
> SSL_VERSION_ID of the form;
>     *0.9.6*engine*
> 
> Of course, this won't work for 0.9.7 snapshots. :-)
> 
> Also related to that, in 0.9.7-dev snapshots, it is necessary to call
> ENGINE_load_builtin_engines() at some point prior to the first ENGINE_by_id()
> call otherwise there will be no engines available except "openssl". FWIW: the
> reason for this is that linkers can then work out if applications needs the code
> for all the engines linked in or not, because not only does it otherwise bloat
> the application with code it may not need, it also drags in the DSO code by
> dependancy, and that requires extra linker flags on some platforms. If you call
> that function, it all gets linked in - if you don't, it doesn't.

Thanks for the hints, Geoff. How about the following for mod_ssl 2.8.3?

Index: libssl.module
===================================================================
RCS file: /e/modssl/cvs/mod_ssl/pkg.apache/src/modules/ssl/libssl.module,v
retrieving revision 1.62
diff -u -d -r1.62 libssl.module
--- libssl.module       2001/03/12 19:50:10     1.62
+++ libssl.module       2001/03/31 07:52:35
@@ -367,7 +367,7 @@
     #   SSL engine support
     #
     case $SSL_VERSION_ID in
-        *0.9.6*engine* )
+        *0.9.6*engine* | *0.9.[789]* )
             SSL_CFLAGS="$SSL_CFLAGS -DSSL_ENGINE"
             ;;
     esac
Index: ssl_engine_config.c
===================================================================
RCS file: /e/modssl/cvs/mod_ssl/pkg.apache/src/modules/ssl/ssl_engine_config.c,v
retrieving revision 1.77
diff -u -d -r1.77 ssl_engine_config.c
--- ssl_engine_config.c 2001/03/30 10:03:04     1.77
+++ ssl_engine_config.c 2001/03/31 07:51:25
@@ -450,7 +450,14 @@
     SSLModConfigRec *mc = myModConfig();
     const char *err;
     ENGINE *e;
+#if SSL_LIBRARY_VERSION >= 0x00907000
+    static int loaded_engines = FALSE;
 
+    if (!loaded_engines) {
+        ENGINE_load_builtin_engines();
+        loaded_engines = TRUE;
+    }
+#endif
     if ((err = ap_check_cmd_context(cmd, GLOBAL_ONLY)) != NULL)
         return err;
     if (strcEQ(arg, "builtin")) {

                                       Ralf S. Engelschall
                                       [EMAIL PROTECTED]
                                       www.engelschall.com
______________________________________________________________________
Apache Interface to OpenSSL (mod_ssl)                   www.modssl.org
User Support Mailing List                      [EMAIL PROTECTED]
Automated List Manager                            [EMAIL PROTECTED]

Reply via email to