ssl_scache_dc.c revision 2d4180e0520fbba07aed22d25dd1e9fce4935d94
/* 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
* | | | | | | (_) | (_| | \__ \__ \ |
* |_| |_| |_|\___/ \__,_|___|___/___/_|
* |_____|
* Distributed Session Cache (client support)
*/
#include "ssl_private.h"
/* Only build this code if it's enabled at configure-time. */
#ifdef HAVE_DISTCACHE
#include "distcache/dc_client.h"
#error "You must compile with a more recent version of the distcache-base package"
#endif
/*
* This cache implementation allows modssl to access 'distcache' servers (or
* proxies) to facilitate distributed session caching. It is based on code
* released as open source by Cryptographic Appliances Inc, and was developed by
* Geoff Thorpe, Steve Robb, and Chris Zimmerman.
*/
/*
**
** High-Level "handlers" as per ssl_scache.c
**
*/
{
/*
* Create a session context
*/
ssl_die();
}
#if 0
/* If a "persistent connection" mode of operation is preferred, you *must*
* also use the PIDCHECK flag to ensure fork()'d processes don't interlace
* comms on the same connection as each other. */
#define SESSION_CTX_FLAGS SESSION_CTX_FLAG_PERSISTENT | \
#else
/* This mode of operation will open a temporary connection to the 'target'
* for each cache operation - this makes it safe against fork()
* automatically. This mode is preferred when running a local proxy (over
* unix domain sockets) because overhead is negligable and it reduces the
* performance/stability danger of file-descriptor bloatage. */
#define SESSION_CTX_FLAGS 0
#endif
if (!ctx) {
ssl_die();
}
/*
* Success ...
*/
return;
}
static void ssl_scache_dc_kill(server_rec *s)
{
if (mc->tSessionCacheDataTable)
}
{
/* !@#$%^ - why do we deal with *absolute* time anyway??? */
/* Send the serialised session to the distributed cache context */
(unsigned long)timeout * 1000)) {
return FALSE;
}
return TRUE;
}
apr_pool_t *p)
{
unsigned int data_len;
/* Retrieve any corresponding session from the distributed cache context */
return FALSE;
}
return FALSE;
}
return TRUE;
}
{
/* Remove any corresponding session from the distributed cache context */
} else {
}
}
{
"distributed scache 'ssl_scache_dc_status'");
ap_rprintf(r, "cache type: <b>DC (Distributed Cache)</b>, "
}
const modssl_sesscache_provider modssl_sesscache_dc = {
};
#endif