fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* Licensed to the Apache Software Foundation (ASF) under one or more
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * contributor license agreements. See the NOTICE file distributed with
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * this work for additional information regarding copyright ownership.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * The ASF licenses this file to You under the Apache License, Version 2.0
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * (the "License"); you may not use this file except in compliance with
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * the License. You may obtain a copy of the License at
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Unless required by applicable law or agreed to in writing, software
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * distributed under the License is distributed on an "AS IS" BASIS,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * See the License for the specific language governing permissions and
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * limitations under the License.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * _ __ ___ ___ __| | ___ ___| | mod_ssl
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * | '_ ` _ \ / _ \ / _` | / __/ __| | Apache Interface to OpenSSL
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * | | | | | | (_) | (_| | \__ \__ \ |
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * |_| |_| |_|\___/ \__,_|___|___/___/_|
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Session Cache Abstraction
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* ``Open-Source Software: generous
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte programmers from around the world all
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte join forces to help you shoot
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte yourself in the foot for free.''
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte -- Unknown */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* _________________________________________________________________
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte** Session Cache: Common Abstraction Layer
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte** _________________________________________________________________
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteapr_status_t ssl_scache_init(server_rec *s, apr_pool_t *p)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* The very first invocation of this function will be the
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * post_config invocation during server startup; do nothing for
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * this first (and only the first) time through, since the pool
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * will be immediately cleared anyway. For every subsequent
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * invocation, initialize the configured cache. */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (ap_state_query(AP_SQ_MAIN_STATE) == AP_SQ_MS_CREATE_PRE_CONFIG)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte rv = mc->stapling_cache->init(mc->stapling_cache_context,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(01872)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "Could not initialize stapling cache. Exiting.");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Warn the user that he should use the session cache.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * But we can operate without it, of course.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s, APLOGNO(01873)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "Init: Session Cache is not configured "
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "[hint: SSLSessionCache]");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte rv = mc->sesscache->init(mc->sesscache_context, "mod_ssl-session", &hints, s, p);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(01874)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "Could not initialize session cache. Exiting.");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mc->sesscache->destroy(mc->sesscache_context, s);
#ifdef HAVE_OCSP_STAPLING
apr_pool_t *p)
return FALSE;
ssl_mutex_on(s);
ssl_mutex_off(s);
apr_pool_t *p)
ssl_mutex_on(s);
ssl_mutex_off(s);
return NULL;
apr_pool_t *p)
ssl_mutex_on(s);
ssl_mutex_off(s);
return OK;
ap_rputs("<b><font color=\"#ffffff\" face=\"Arial,Helvetica\">SSL/TLS Session Cache Status:</font></b>\r", r);
return OK;