ssl_scache.c revision 5bfaaf573bacb45c1cf290ce85ecc676587e8a64
/* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* _ _
* _ __ ___ ___ __| | ___ ___| | mod_ssl
* | '_ ` _ \ / _ \ / _` | / __/ __| | Apache Interface to OpenSSL
* | | | | | | (_) | (_| | \__ \__ \ |
* |_| |_| |_|\___/ \__,_|___|___/___/_|
* |_____|
* Session Cache Abstraction
*/
/* ``Open-Source Software: generous
programmers from around the world all
join forces to help you shoot
yourself in the foot for free.''
-- Unknown */
#include "ssl_private.h"
#include "mod_status.h"
/* _________________________________________________________________
**
** Session Cache: Common Abstraction Layer
** _________________________________________________________________
*/
{
struct ap_socache_hints hints;
/* The very first invocation of this function will be the
* post_config invocation during server startup; do nothing for
* this first (and only the first) time through, since the pool
* will be immediately cleared anyway. For every subsequent
* invocation, initialize the configured cache. */
return;
#ifdef HAVE_OCSP_STAPLING
if (mc->stapling_cache) {
"mod_ssl-stapling", &hints, s, p);
if (rv) {
"Could not initialize stapling cache. Exiting.");
ssl_die();
}
}
#endif
/*
* Warn the user that he should use the session cache.
* But we can operate without it, of course.
*/
"Init: Session Cache is not configured "
"[hint: SSLSessionCache]");
return;
}
if (rv) {
"Could not initialize session cache. Exiting.");
ssl_die();
}
}
void ssl_scache_kill(server_rec *s)
{
}
#ifdef HAVE_OCSP_STAPLING
if (mc->stapling_cache) {
}
#endif
}
apr_pool_t *p)
{
unsigned int len;
/* Serialise the session. */
"session is too big (%u bytes)", len);
return FALSE;
}
ssl_mutex_on(s);
}
ssl_mutex_off(s);
}
}
apr_pool_t *p)
{
unsigned char dest[SSL_SESSION_MAX_DER];
unsigned int destlen = SSL_SESSION_MAX_DER;
MODSSL_D2I_SSL_SESSION_CONST unsigned char *ptr;
ssl_mutex_on(s);
}
ssl_mutex_off(s);
}
if (rv != APR_SUCCESS) {
return NULL;
}
}
apr_pool_t *p)
{
ssl_mutex_on(s);
}
ssl_mutex_off(s);
}
}
/* _________________________________________________________________
**
** SSL Extension to mod_status
** _________________________________________________________________
*/
{
return OK;
ap_rputs("<hr>\n", r);
ap_rputs("<table cellspacing=0 cellpadding=0>\n", r);
ap_rputs("<tr><td bgcolor=\"#000000\">\n", r);
ap_rputs("<b><font color=\"#ffffff\" face=\"Arial,Helvetica\">SSL/TLS Session Cache Status:</font></b>\r", r);
ap_rputs("</td></tr>\n", r);
ap_rputs("<tr><td bgcolor=\"#ffffff\">\n", r);
ssl_mutex_on(r->server);
}
ssl_mutex_off(r->server);
}
ap_rputs("</td></tr>\n", r);
ap_rputs("</table>\n", r);
return OK;
}
void ssl_scache_status_register(apr_pool_t *p)
{
}