00001 /** @file 00002 00003 A brief file description 00004 00005 @section license License 00006 00007 Licensed to the Apache Software Foundation (ASF) under one 00008 or more contributor license agreements. See the NOTICE file 00009 distributed with this work for additional information 00010 regarding copyright ownership. The ASF licenses this file 00011 to you under the Apache License, Version 2.0 (the 00012 "License"); you may not use this file except in compliance 00013 with the License. You may obtain a copy of the License at 00014 00015 http://www.apache.org/licenses/LICENSE-2.0 00016 00017 Unless required by applicable law or agreed to in writing, software 00018 distributed under the License is distributed on an "AS IS" BASIS, 00019 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00020 See the License for the specific language governing permissions and 00021 limitations under the License. 00022 */ 00023 00024 /*************************** -*- Mod: C++ -*- ****************************** 00025 P_SSLConfig.h 00026 Created On : 07/20/2000 00027 00028 Description: 00029 SSL Configurations 00030 ****************************************************************************/ 00031 #ifndef __P_SSLCONFIG_H__ 00032 #define __P_SSLCONFIG_H__ 00033 00034 #include "ProxyConfig.h" 00035 00036 struct SSLCertLookup; 00037 00038 ///////////////////////////////////////////////////////////// 00039 // 00040 // struct SSLConfigParams 00041 // 00042 // configuration parameters as they apear in the global 00043 // configuration file. 00044 ///////////////////////////////////////////////////////////// 00045 00046 00047 typedef void (*init_ssl_ctx_func)(void *, bool); 00048 00049 struct SSLConfigParams : public ConfigInfo 00050 { 00051 enum SSL_SESSION_CACHE_MODE 00052 { 00053 SSL_SESSION_CACHE_MODE_OFF = 0, 00054 SSL_SESSION_CACHE_MODE_SERVER = 1 00055 }; 00056 00057 SSLConfigParams(); 00058 virtual ~SSLConfigParams(); 00059 00060 char * serverCertPathOnly; 00061 char * serverCertChainFilename; 00062 char * serverKeyPathOnly; 00063 char * serverCACertFilename; 00064 char * serverCACertPath; 00065 char * configFilePath; 00066 char * cipherSuite; 00067 char * client_cipherSuite; 00068 int clientCertLevel; 00069 int verify_depth; 00070 int ssl_session_cache; // SSL_SESSION_CACHE_MODE 00071 int ssl_session_cache_size; 00072 int ssl_session_cache_timeout; 00073 00074 char * clientCertPath; 00075 char * clientKeyPath; 00076 char * clientCACertFilename; 00077 char * clientCACertPath; 00078 int clientVerify; 00079 int client_verify_depth; 00080 long ssl_ctx_options; 00081 long ssl_client_ctx_protocols; 00082 00083 static int ssl_maxrecord; 00084 static bool ssl_allow_client_renegotiation; 00085 00086 static bool ssl_ocsp_enabled; 00087 static int ssl_ocsp_cache_timeout; 00088 static int ssl_ocsp_request_timeout; 00089 static int ssl_ocsp_update_period; 00090 00091 static init_ssl_ctx_func init_ssl_ctx_cb; 00092 00093 void initialize(); 00094 void cleanup(); 00095 }; 00096 00097 ///////////////////////////////////////////////////////////// 00098 // 00099 // class SSLConfig 00100 // 00101 ///////////////////////////////////////////////////////////// 00102 00103 struct SSLConfig 00104 { 00105 static void startup(); 00106 static void reconfigure(); 00107 static SSLConfigParams * acquire(); 00108 static void release(SSLConfigParams * params); 00109 00110 typedef ConfigProcessor::scoped_config<SSLConfig, SSLConfigParams> scoped_config; 00111 00112 private: 00113 static int configid; 00114 }; 00115 00116 struct SSLCertificateConfig 00117 { 00118 static void startup(); 00119 static void reconfigure(); 00120 static SSLCertLookup * acquire(); 00121 static void release(SSLCertLookup * params); 00122 00123 typedef ConfigProcessor::scoped_config<SSLCertificateConfig, SSLCertLookup> scoped_config; 00124 00125 private: 00126 static int configid; 00127 }; 00128 00129 #endif