I've identified two problems in apr_crypto_get_driver(), and need
somebody to review my thinking and make the appropriate corrections.
First up is this block:
rv = apu_dso_load(&dso, &symbol, modname, symname, pool);
if (rv != APR_SUCCESS) { /* APR_EDSOOPEN or APR_ESYMNOTFOUND? */
if (rv == APR_EINIT) { /* previously loaded?!? */
name = apr_pstrdup(pool, name);
apr_hash_set(drivers, name, APR_HASH_KEY_STRING, *driver);
rv = APR_SUCCESS;
That apr_hash_set() will store a NULL, since the only way here is when
*driver == NULL. Further, it certainly shouldn't set rv to APR_SUCCESS
since nothing got loaded and returned in *driver.
The second problem is the series of DRIVER_LOAD() calls at the bottom
of the function. None of these appear to set *driver to the
appropriate value. (and beware macro arg name shadowing)
Cheers,
-g