1 /* Licensed to the Apache Software Foundation (ASF) under one or more 2 * contributor license agreements. See the NOTICE file distributed with 3 * this work for additional information regarding copyright ownership. 4 * The ASF licenses this file to You under the Apache License, Version 2.0 5 * (the "License"); you may not use this file except in compliance with 6 * the License. You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 #ifndef tls_cache_h 17 #define tls_cache_h 18 19 /* name of the global session cache mutex, should we need it */ 20 #define TLS_SESSION_CACHE_MUTEX_TYPE "tls-session-cache" 21 22 23 /** 24 * Set the specification of the session cache to use. The syntax is 25 * "default|none|<provider_name>(:<arguments>)?" 26 * 27 * @param spec the cache specification 28 * @param gconf the modules global configuration 29 * @param p pool for permanent allocations 30 * @param ptemp pool for temporary allocations 31 * @return NULL on success or an error message 32 */ 33 const char *tls_cache_set_specification( 34 const char *spec, tls_conf_global_t *gconf, apr_pool_t *p, apr_pool_t *ptemp); 35 36 /** 37 * Setup before configuration runs, announces our potential global mutex. 38 */ 39 void tls_cache_pre_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp); 40 41 /** 42 * Verify the cache settings at the end of the configuration and 43 * create the default session cache, if not already done. 44 */ 45 apr_status_t tls_cache_post_config(apr_pool_t *p, apr_pool_t *ptemp, server_rec *s); 46 47 /** 48 * Started a new child, make sure that global mutex we might use is set up. 49 */ 50 void tls_cache_init_child(apr_pool_t *p, server_rec *s); 51 52 /** 53 * Free all cache related resources. 54 */ 55 void tls_cache_free(server_rec *s); 56 57 /** 58 * Initialize the session store for the server's config builder. 59 */ 60 apr_status_t tls_cache_init_server( 61 rustls_server_config_builder *builder, server_rec *s); 62 63 #endif /* tls_cache_h */