* This callback function is executed by OpenSSL whenever a * SSL_SESSION is removed from the internal OpenSSL cache. * We use this to remove the SSL_SESSION in the inter-process * disk-cache, too. */
| 1987 | * disk-cache, too. |
| 1988 | */ |
| 1989 | void ssl_callback_DelSessionCacheEntry(SSL_CTX *ctx, |
| 1990 | SSL_SESSION *session) |
| 1991 | { |
| 1992 | server_rec *s; |
| 1993 | SSLSrvConfigRec *sc; |
| 1994 | IDCONST unsigned char *id; |
| 1995 | unsigned int idlen; |
| 1996 | |
| 1997 | /* |
| 1998 | * Get Apache context back through OpenSSL context |
| 1999 | */ |
| 2000 | if (!(s = (server_rec *)SSL_CTX_get_app_data(ctx))) { |
| 2001 | return; /* on server shutdown Apache is already gone */ |
| 2002 | } |
| 2003 | |
| 2004 | sc = mySrvConfig(s); |
| 2005 | |
| 2006 | /* |
| 2007 | * Remove the SSL_SESSION from the inter-process cache |
| 2008 | */ |
| 2009 | #ifdef OPENSSL_NO_SSL_INTERN |
| 2010 | id = (unsigned char *)SSL_SESSION_get_id(session, &idlen); |
| 2011 | #else |
| 2012 | id = session->session_id; |
| 2013 | idlen = session->session_id_length; |
| 2014 | #endif |
| 2015 | |
| 2016 | /* TODO: Do we need a temp pool here, or are we always shutting down? */ |
| 2017 | ssl_scache_remove(s, id, idlen, sc->mc->pPool); |
| 2018 | |
| 2019 | ssl_session_log(s, "REM", id, idlen, |
| 2020 | "OK", "dead", 0); |
| 2021 | |
| 2022 | return; |
| 2023 | } |
| 2024 | |
| 2025 | /* Dump debugginfo trace to the log file. */ |
| 2026 | static void log_tracing_state(const SSL *ssl, conn_rec *c, |
nothing calls this directly
no test coverage detected