48#define SSL_CMD_ALL(name, args, desc) \
49 AP_INIT_##args("SSL"#name, ssl_cmd_SSL##name, \
50 NULL, RSRC_CONF|OR_AUTHCFG, desc),
52#define SSL_CMD_SRV(name, args, desc) \
53 AP_INIT_##args("SSL"#name, ssl_cmd_SSL##name, \
54 NULL, RSRC_CONF, desc),
56#define SSL_CMD_PXY(name, args, desc) \
57 AP_INIT_##args("SSL"#name, ssl_cmd_SSL##name, \
58 NULL, RSRC_CONF|PROXY_CONF, desc),
60#define SSL_CMD_DIR(name, type, args, desc) \
61 AP_INIT_##args("SSL"#name, ssl_cmd_SSL##name, \
62 NULL, OR_##type, desc),
64#define AP_END_CMD { NULL }
71 "SSL dialog mechanism for the pass phrase query "
72 "('builtin', '|/path/to/pipe_program', "
73 "or 'exec:/path/to/cgi_program')")
75 "SSL Session Cache storage "
76 "('none', 'nonenotnull', 'dbm:/path/to/file')")
78 "SSL external Crypto Device usage "
81 "SSL Pseudo Random Number Generator (PRNG) seeding source "
82 "('startup|connect builtin|file:/path|exec:/path [bytes]')")
88 "SSL switch for the protocol engine "
91 "Enable FIPS-140 mode "
94 "Colon-delimited list of permitted SSL Ciphers, optional preceded "
95 "by protocol identifier ('XXX:...:XXX' - see manual)")
97 "SSL Server Certificate file "
98 "('/path/to/file' - PEM or DER encoded)")
100 "SSL Server Private Key file "
101 "('/path/to/file' - PEM or DER encoded)")
103 "SSL Server CA Certificate Chain file "
104 "('/path/to/file' - PEM encoded)")
105#ifdef HAVE_TLS_SESSION_TICKETS
107 "TLS session ticket encryption/decryption key file (RFC 5077) "
108 "('/path/to/file' - file with 48 bytes of random data)")
111 "SSL CA Certificate path "
112 "('/path/to/dir' - contains PEM encoded files)")
114 "SSL CA Certificate file "
115 "('/path/to/file' - PEM encoded)")
117 "SSL CA Distinguished Name path "
118 "('/path/to/dir' - symlink hashes to PEM of acceptable CA names to request)")
120 "SSL CA Distinguished Name file "
121 "('/path/to/file' - PEM encoded to derive acceptable CA names to request)")
123 "SSL CA Certificate Revocation List (CRL) path "
124 "('/path/to/dir' - contains PEM encoded files)")
126 "SSL CA Certificate Revocation List (CRL) file "
127 "('/path/to/file' - PEM encoded)")
129 "SSL CA Certificate Revocation List (CRL) checking mode")
131 "SSL Client verify type "
132 "('none', 'optional', 'require', 'optional_no_ca')")
134 "SSL Client verify depth "
135 "('N' - number of intermediate certificates)")
137 "SSL Session Cache object lifetime "
138 "('N' - number of seconds)")
139#ifdef OPENSSL_NO_SSL3
140#define SSLv3_PROTO_PREFIX ""
142#define SSLv3_PROTO_PREFIX "SSLv3|"
145#define SSL_PROTOCOLS SSLv3_PROTO_PREFIX "TLSv1|TLSv1.1|TLSv1.2"
147#define SSL_PROTOCOLS SSLv3_PROTO_PREFIX "TLSv1"
150 "Enable or disable various SSL protocols "
153 "Use the server's cipher ordering preference")
155 "Enable SSL level compression "
158 "Enable or disable TLS session tickets"
161 "Enable support for insecure renegotiation")
163 "Set user name to SSL variable value")
165 "Strict SNI virtual host checking")
170 "('/path/to/file' - created by srptool)")
172 "SRP seed for unknown users (to avoid leaking a user's existence) "
173 "('some secret text')")
180 "SSL switch for the proxy protocol engine "
183 "SSL Proxy: enable or disable SSL protocol flavors "
186 "SSL Proxy: colon-delimited list of permitted SSL ciphers "
187 ", optionally preceded by protocol specifier ('XXX:...:XXX' - see manual)")
189 "SSL Proxy: whether to verify the remote certificate "
192 "SSL Proxy: maximum certificate verification depth "
193 "('N' - number of intermediate certificates)")
195 "SSL Proxy: file containing server certificates "
196 "('/path/to/file' - PEM encoded certificates)")
198 "SSL Proxy: directory containing server certificates "
199 "('/path/to/dir' - contains PEM encoded certificates)")
201 "SSL Proxy: CA Certificate Revocation List (CRL) path "
202 "('/path/to/dir' - contains PEM encoded files)")
204 "SSL Proxy: CA Certificate Revocation List (CRL) file "
205 "('/path/to/file' - PEM encoded)")
207 "SSL Proxy: CA Certificate Revocation List (CRL) checking mode")
209 "SSL Proxy: file containing client certificates "
210 "('/path/to/file' - PEM encoded certificates)")
212 "SSL Proxy: directory containing client certificates "
213 "('/path/to/dir' - contains PEM encoded certificates)")
215 "SSL Proxy: file containing issuing certificates "
216 "of the client certificate "
217 "(`/path/to/file' - PEM encoded certificates)")
219 "SSL Proxy: check the peer certificate's expiration date")
221 "SSL Proxy: check the peer certificate's CN")
223 "SSL Proxy: check the peer certificate's name "
224 "(must be present in subjectAltName extension or CN")
230 "Set one or more options to configure the SSL engine"
231 "('[+-]option[=value] ...' - see manual)")
233 "Require the SSL protocol for the per-directory context "
236 "Require a boolean expression to evaluate to true for granting access"
237 "(arbitrary complex boolean expression - see manual)")
239 "Configure the amount of memory that will be used for buffering the "
240 "request body if a per-location SSL renegotiation is required due to "
241 "changed access control requirements")
244 "Enable use of OCSP to verify certificate revocation mode ('on', 'leaf', 'off')")
246 "URL of the default OCSP Responder")
248 "Force use of the default responder URL ('on', 'off')")
250 "Maximum time difference in OCSP responses")
252 "Maximum age of OCSP responses")
254 "OCSP responder query timeout")
256 "Whether OCSP queries use a nonce or not ('on', 'off')")
258 "Proxy URL to use for OCSP requests")
262 "Do not verify OCSP Responder certificate ('on', 'off')")
265 "Trusted OCSP responder certificates"
266 "(`/path/to/file' - PEM encoded certificates)")
268#ifdef HAVE_OCSP_STAPLING
273 "SSL Stapling Response Cache storage "
274 "(`dbm:/path/to/file')")
276 "SSL switch for the OCSP Stapling protocol " "(`on', `off')")
278 "SSL stapling option for maximum time difference in OCSP responses")
280 "SSL stapling option for OCSP responder timeout")
282 "SSL stapling option for maximum age of OCSP responses")
284 "SSL stapling option for normal OCSP Response Cache Lifetime")
286 "SSL stapling switch to return Status Errors Back to Client"
289 "SSL stapling switch to send tryLater response to client on error "
292 "SSL stapling option for OCSP Response Error Cache Lifetime")
294 "SSL stapling option to Force the OCSP Stapling URL")
297#ifdef HAVE_SSL_CONF_CMD
299 "OpenSSL configuration command")
304 "SSLLog directive is no longer supported - use ErrorLog."),
306 "SSLLogLevel directive is no longer supported - use LogLevel."),
319 if (
strcmp(
mod->name,
"mod_ssl.c") == 0) {
328#if HAVE_OPENSSL_INIT_SSL || (OPENSSL_VERSION_NUMBER >= 0x10100000L && \
329 !defined(LIBRESSL_VERSION_NUMBER))
345#if HAVE_ENGINE_LOAD_BUILTIN_ENGINES
348#if OPENSSL_VERSION_NUMBER >= 0x1000200fL
349#ifndef OPENSSL_NO_COMP
355#if MODSSL_USE_OPENSSL_PRE_1_1_API
356#if OPENSSL_VERSION_NUMBER >= 0x1000000fL
366#if (OPENSSL_VERSION_NUMBER >= 0x00090805f)
395#if HAVE_OPENSSL_INIT_SSL || (OPENSSL_VERSION_NUMBER >= 0x10100000L && \
396 !defined(LIBRESSL_VERSION_NUMBER))
409#if APR_HAS_THREADS && MODSSL_USE_OPENSSL_PRE_1_1_API
412#if MODSSL_USE_OPENSSL_PRE_1_1_API || defined(LIBRESSL_VERSION_NUMBER)
420#if HAVE_ENGINE_LOAD_BUILTIN_ENGINES
428 (void)
OBJ_create(
"1.3.6.1.5.5.7.8.7",
"id-on-dnsSRV",
429 "SRVName otherName form");
449#ifdef HAVE_OCSP_STAPLING
484 if (per_dir_config) {
520 if (!
sslconn->dc->proxy_enabled) {
561 "SSL Proxy requested for %s but not enabled for us.",
596 c->outgoing ?
"Proxy: " :
"Server: ");
607 "Unable to create a new SSL connection from the SSL "
628 "Unable to set session id context to '%s'",
vhost_md5);
681 "Connection to child %ld established "
715 static const char *
pre_prr[] = {
"mod_setenvif.c",
NULL };
720 static const char *
b_pc[] = {
"mod_proxy.c",
NULL};
761module AP_MODULE_DECLARE_DATA ssl_module = {
762 STANDARD20_MODULE_STUFF,
763 ssl_config_perdir_create,
764 ssl_config_perdir_merge,
765 ssl_config_server_create,
766 ssl_config_server_merge,
769#if defined(AP_MODULE_HAS_FLAGS)
770 ,AP_MODULE_FLAG_ALWAYS_MERGE
void ap_hook_process_connection(ap_HOOK_process_connection_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
void ap_hook_pre_connection(ap_HOOK_pre_connection_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
static apr_pool_t * pconf
#define ap_get_module_config(v, m)
void ap_hook_post_config(ap_HOOK_post_config_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
void ap_hook_test_config(ap_HOOK_test_config_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
struct ap_conf_vector_t ap_conf_vector_t
const char * ap_set_deprecated(cmd_parms *cmd, void *struct_ptr, const char *arg)
#define AP_INIT_RAW_ARGS(directive, func, mconfig, where, help)
void ap_hook_pre_config(ap_HOOK_pre_config_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
void ap_hook_child_init(ap_HOOK_child_init_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
apr_status_t ap_get_brigade(ap_filter_t *filter, apr_bucket_brigade *bucket, ap_input_mode_t mode, apr_read_type_e block, apr_off_t readbytes)
apr_status_t ap_mutex_register(apr_pool_t *pconf, const char *type, const char *default_dir, apr_lockmech_e default_mech, apr_int32_t options)
void ap_hook_http_scheme(ap_HOOK_http_scheme_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
void ap_hook_post_read_request(ap_HOOK_post_read_request_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
void ap_hook_default_port(ap_HOOK_default_port_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
void ap_hook_ssl_bind_outgoing(ap_HOOK_ssl_bind_outgoing_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
apr_status_t ap_register_auth_provider(apr_pool_t *pool, const char *provider_group, const char *provider_name, const char *provider_version, const void *provider, int type)
#define AP_AUTH_INTERNAL_PER_CONF
void ap_hook_check_access(ap_HOOK_access_checker_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder, int type)
void ap_hook_fixups(ap_HOOK_fixups_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
void ap_hook_check_authn(ap_HOOK_check_user_id_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder, int type)
void ap_hook_check_authz(ap_HOOK_auth_checker_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder, int type)
#define APR_MD5_DIGESTSIZE
apr_memcache_server_t * server
#define APR_IMPLEMENT_OPTIONAL_HOOK_RUN_ALL(ns, link, ret, name, args_decl, args_use, ok, decline)
#define APR_OPTIONAL_HOOK(ns, name, pfn, aszPre, aszSucc, nOrder)
const authz_provider ssl_authz_provider_require_ssl
int modssl_request_is_tls(const request_rec *r, SSLConnRec **sslconn)
int ssl_hook_Fixup(request_rec *r)
int ssl_hook_Auth(request_rec *r)
int ssl_init_ssl_connection(conn_rec *c, request_rec *r)
apr_status_t ssl_init_Module(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *base_server)
void ssl_var_log_config_register(apr_pool_t *p)
void ssl_io_filter_register(apr_pool_t *p)
int ssl_proxy_section_post_config(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s, ap_conf_vector_t *section_config)
#define SSL_STAPLING_REFRESH_MUTEX_TYPE
void ssl_scache_status_register(apr_pool_t *p)
#define myConnConfigSet(c, val)
void ssl_log_ssl_error(const char *file, int line, int level, server_rec *s)
void ssl_io_filter_init(conn_rec *c, request_rec *r, SSL *ssl)
#define myConnCtxConfig(c, sc)
#define SSL_CACHE_MUTEX_TYPE
int ssl_hook_ReadReq(request_rec *r)
const authz_provider ssl_authz_provider_verify_client
int ssl_hook_UserCheck(request_rec *r)
int ssl_hook_Access(request_rec *r)
#define SSL_STAPLING_CACHE_MUTEX_TYPE
void ssl_init_Child(apr_pool_t *p, server_rec *s)
int ssl_rand_seed(server_rec *s, apr_pool_t *p, ssl_rsctx_t nCtx, char *prefix)
void ssl_var_register(apr_pool_t *p)
void ssl_hook_ConfigTest(apr_pool_t *pconf, server_rec *s)
void modssl_set_app_data2(SSL *ssl, void *arg)
int ssl_run_pre_handshake(conn_rec *c, SSL *ssl, int is_proxy)
apr_vformatter_buff_t * c
#define apr_pcalloc(p, size)
#define AUTHZ_PROVIDER_VERSION
#define AUTHZ_PROVIDER_GROUP
Proxy Extension Module for Apache.
static const command_rec ssl_config_cmds[]
#define SSL_CMD_SRV(name, args, desc)
static SSLConnRec * ssl_init_connection_ctx(conn_rec *c, ap_conf_vector_t *per_dir_config, int reinit)
static apr_status_t ssl_cleanup_pre_config(void *data)
static int ssl_hook_pre_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp)
static int ssl_engine_status(conn_rec *c, SSLConnRec *sslconn)
static void ssl_register_hooks(apr_pool_t *p)
static const char * ssl_hook_http_scheme(const request_rec *r)
static int ssl_hook_pre_connection(conn_rec *c, void *csd)
static int ssl_hook_ssl_bind_outgoing(conn_rec *c, ap_conf_vector_t *per_dir_config, int enable_ssl)
#define SSL_CMD_DIR(name, type, args, desc)
static int modssl_is_prelinked(void)
#define SSL_CMD_PXY(name, args, desc)
static int ssl_hook_process_connection(conn_rec *c)
static apr_port_t ssl_hook_default_port(const request_rec *r)
static int modssl_running_statically
#define SSL_CMD_ALL(name, args, desc)
Internal interfaces private to mod_ssl.
Structure to store things which are per connection.
const char * cipher_suite
A structure that represents the current request.
struct ap_conf_vector_t * per_dir_config
A structure to store information for each virtual server.
char * ap_md5_binary(apr_pool_t *p, const unsigned char *buf, int length)
Apache Mutex support library.