On Tue, Aug 17, 1999, [EMAIL PROTECTED] wrote:

> [...]
> SSL_SESSION *ssl_scache_lookup(const conn_rec *c)
> {
>     SSL *ssl;
>     SSL_SESSION *pSession;
>   
>     ssl = ap_ctx_get(c->client->ctx, "ssl");
>     if (ssl == NULL)
>   return NULL;
> 
>     pSession = SSL_get_session(ssl);
>     if (pSession == NULL)
>   return NULL;
> 
>     return ssl_scache_retrieve(pSession->session_id,
>                                pSession->session_id_length);
> }
> 
> I would think that the call to ssl_scache_retrieve would be redundant, but
> at first pass, it doesn't appear so. 
> This works fine, the first time. But
> subsequent calls fail in ssl_util_sdbm.c:getpair(). I am using sdbm
> exclusively.

What do you mean by "first time" and "subsequent calls", Tom?  Do you mean
really subsequent calls in the same HTTP request processing step or calls in
different HTTP requests? At least I think that the ssl_scache_retrieve
function call should be not needed. The corresponding EAPI hook can be like
this:

Provider:

   ap_hook_configure("ap::mod_ssl::scache::lookup",
                     AP_HOOK_SIG2(ptr,ptr), AP_HOOK_DECLINE(NULL));
   ap_hook_register("ap::mod_ssl::scache::lookup",
                    ssl_scache_lookup, AP_HOOK_NOCTX);

User:

   SSL_SESSION *session;
   conn_rec *c;
   
   c = ...set connection...
   ap_hook_call("ap::mod_ssl::scache::lookup", &session, c);
   if (session != NULL) {
       ...work with session...
   }
                                       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