OK forget all my other ramblings I'm pretty sure I know the cause now.

The change suggested in PR#2045 has problems if the ENGINE_add() call
fails: it ends up adding a reference to a freed up ENGINE which is
likely to subsequently contain garbage and generally spoil your whole day.

This will happen if an ENGINE with the same name is added multiple
times, for example different libraries, in your case curl and mod_ssl.

There is a second problem: cpuid isn't setup correctly and the mod_ssl
only adds the dummy ENGINE as a result.

Solutions...

1. The patch in PR#2045 should check the return value of ENGINE_add() so
you now have:

if (ENGINE_add(toadd))
     ENGINE_register_complete(toadd);

2. CPU ID needs to be set up so the aesni ENGINE can see it.

I'd suggest adding OPENSSL_cpuid_setup() at the top of
ENGINE_load_builtin_engines().

Steve.
-- 
Dr Stephen N. Henson. OpenSSL project core developer.
Commercial tech support now available see: http://www.openssl.org

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       openssl-dev@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to