00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073 #include <openssl/ssl.h>
00074
00075 #ifndef BOOL
00076 #define BOOL unsigned int
00077 #endif
00078
00079 typedef enum {
00080 SSL_SHUTDOWN_TYPE_UNSET,
00081 SSL_SHUTDOWN_TYPE_STANDARD,
00082 SSL_SHUTDOWN_TYPE_UNCLEAN,
00083 SSL_SHUTDOWN_TYPE_ACCURATE
00084 } ssl_shutdown_type_e;
00085
00086 typedef enum {
00087 SSL_ENABLED_UNSET = -1,
00088 SSL_ENABLED_FALSE = 0,
00089 SSL_ENABLED_TRUE = 1,
00090 SSL_ENABLED_OPTIONAL = 3
00091 } ssl_enabled_t;
00092
00093 #if AP_MODULE_MAGIC_AT_LEAST(20051115,0)
00094 typedef enum {
00095 SSL_CVERIFY_UNSET = -1,
00096 SSL_CVERIFY_NONE = 0,
00097 SSL_CVERIFY_OPTIONAL = 1,
00098 SSL_CVERIFY_REQUIRE = 2,
00099 SSL_CVERIFY_OPTIONAL_NO_CA = 3
00100 } ssl_verify_t;
00101
00102 #endif
00103
00104 typedef struct {
00105 SSL *ssl;
00106 const char *client_dn;
00107 X509 *client_cert;
00108 ssl_shutdown_type_e shutdown_type;
00109 const char *verify_info;
00110 const char *verify_error;
00111 int verify_depth;
00112 int is_proxy;
00113 int disabled;
00114 int non_ssl_request;
00115 } SSLConnRec;
00116
00117 #if AP_MODULE_MAGIC_AT_LEAST(20051115,0)
00118 typedef struct {
00119 const char *ca_cert_path;
00120 const char *ca_cert_file;
00121
00122 const char *cipher_suite;
00123
00124 int verify_depth;
00125 ssl_verify_t verify_mode;
00126 } modssl_auth_ctx_t;
00127 #endif
00128
00129 typedef struct {
00130 void *sc;
00131 SSL_CTX *ssl_ctx;
00132 #if AP_MODULE_MAGIC_AT_LEAST(20051115,0)
00133 void *pks;
00134 void *pkp;
00135
00136 int protocol;
00137
00138 int pphrase_dialog_type;
00139 const char *pphrase_dialog_path;
00140
00141 const char *cert_chain;
00142
00143 const char *crl_path;
00144 const char *crl_file;
00145 X509_STORE *crl;
00146
00147 modssl_auth_ctx_t auth;
00148 #endif
00149 } modssl_ctx_t;
00150
00151
00152 typedef struct {
00153 void *mc;
00154 BOOL enabled;
00155 BOOL proxy_enabled;
00156 const char *vhost_id;
00157 int vhost_id_len;
00158 int session_cache_timeout;
00159 #if AP_MODULE_MAGIC_AT_LEAST(20051115,0)
00160 BOOL cipher_server_pref;
00161 #endif
00162 modssl_ctx_t *server;
00163 modssl_ctx_t *proxy;
00164 } SSLSrvConfigRec;
00165
00166
00167 typedef struct {
00168 void *mc;
00169 unsigned int enabled;
00170 unsigned int proxy_enabled;
00171 const char *vhost_id;
00172 int vhost_id_len;
00173 int session_cache_timeout;
00174 #if AP_MODULE_MAGIC_AT_LEAST(20051115,0)
00175 BOOL cipher_server_pref;
00176 #endif
00177
00178 int insecure_reneg;
00179 modssl_ctx_t *server;
00180 modssl_ctx_t *proxy;
00181 } SSLSrvConfigRec2;
00182
00183
00184
00185 #define SSLSrvConfigRec_server(sc) (mod_ssl_with_insecure_reneg ? (((SSLSrvConfigRec2 *) sc)->server) : (((SSLSrvConfigRec *) sc)->server))
00186 #define SSLSrvConfigRec_proxy(sc) (mod_ssl_with_insecure_reneg ? (((SSLSrvConfigRec2 *) sc)->proxy) : (((SSLSrvConfigRec *) sc)->proxy))
00187
00188 #if AP_MODULE_MAGIC_AT_LEAST(20051115,0)
00189 typedef struct {
00190 BOOL bSSLRequired;
00191 apr_array_header_t *aRequirement;
00192 int nOptions;
00193 int nOptionsAdd;
00194 int nOptionsDel;
00195 const char *szCipherSuite;
00196 ssl_verify_t nVerifyClient;
00197 int nVerifyDepth;
00198 const char *szCACertificatePath;
00199 const char *szCACertificateFile;
00200 const char *szUserName;
00201 } SSLDirConfigRec;
00202 #endif
00203
00204 extern module AP_MODULE_DECLARE_DATA ssl_module;