Apache HTTPD
mod_ssl.c
Go to the documentation of this file.
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
17/* _ _
18 * _ __ ___ ___ __| | ___ ___| | mod_ssl
19 * | '_ ` _ \ / _ \ / _` | / __/ __| | Apache Interface to OpenSSL
20 * | | | | | | (_) | (_| | \__ \__ \ |
21 * |_| |_| |_|\___/ \__,_|___|___/___/_|
22 * |_____|
23 * mod_ssl.c
24 * Apache API interface structures
25 */
26
27#include "ssl_private.h"
28
29#include "util_md5.h"
30#include "util_mutex.h"
31#include "ap_provider.h"
32#include "http_config.h"
33
34#include "mod_proxy.h" /* for proxy_hook_section_post_config() */
35
36#include <assert.h>
37
39
41 (conn_rec *c,SSL *ssl,int is_proxy),
43
44/*
45 * the table of configuration directives we provide
46 */
47
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),
51
52#define SSL_CMD_SRV(name, args, desc) \
53 AP_INIT_##args("SSL"#name, ssl_cmd_SSL##name, \
54 NULL, RSRC_CONF, desc),
55
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),
59
60#define SSL_CMD_DIR(name, type, args, desc) \
61 AP_INIT_##args("SSL"#name, ssl_cmd_SSL##name, \
62 NULL, OR_##type, desc),
63
64#define AP_END_CMD { NULL }
65
66static const command_rec ssl_config_cmds[] = {
67 /*
68 * Global (main-server) context configuration directives
69 */
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 "
79 "('builtin', '...')")
81 "SSL Pseudo Random Number Generator (PRNG) seeding source "
82 "('startup|connect builtin|file:/path|exec:/path [bytes]')")
83
84 /*
85 * Per-server context configuration directives
86 */
88 "SSL switch for the protocol engine "
89 "('on', 'off')")
91 "Enable FIPS-140 mode "
92 "(`on', `off')")
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)")
109#endif
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 ""
141#else
142#define SSLv3_PROTO_PREFIX "SSLv3|"
143#endif
144#ifdef HAVE_TLSV1_X
145#define SSL_PROTOCOLS SSLv3_PROTO_PREFIX "TLSv1|TLSv1.1|TLSv1.2"
146#else
147#define SSL_PROTOCOLS SSLv3_PROTO_PREFIX "TLSv1"
148#endif
150 "Enable or disable various SSL protocols "
151 "('[+-][" SSL_PROTOCOLS "] ...' - see manual)")
153 "Use the server's cipher ordering preference")
155 "Enable SSL level compression "
156 "(`on', `off')")
158 "Enable or disable TLS session tickets"
159 "(`on', `off')")
161 "Enable support for insecure renegotiation")
163 "Set user name to SSL variable value")
165 "Strict SNI virtual host checking")
166
167#ifdef HAVE_SRP
169 "SRP verifier file "
170 "('/path/to/file' - created by srptool)")
172 "SRP seed for unknown users (to avoid leaking a user's existence) "
173 "('some secret text')")
174#endif
175
176 /*
177 * Proxy configuration for remote SSL connections
178 */
180 "SSL switch for the proxy protocol engine "
181 "('on', 'off')")
183 "SSL Proxy: enable or disable SSL protocol flavors "
184 "('[+-][" SSL_PROTOCOLS "] ...' - see manual)")
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 "
190 "('on' or 'off')")
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")
225
226 /*
227 * Per-directory context configuration directives
228 */
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 "
234 "(no arguments)")
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")
242
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")
259
260/* Define OCSP Responder Certificate Verification Directive */
262 "Do not verify OCSP Responder certificate ('on', 'off')")
263/* Define OCSP Responder File Configuration Directive */
265 "Trusted OCSP responder certificates"
266 "(`/path/to/file' - PEM encoded certificates)")
267
268#ifdef HAVE_OCSP_STAPLING
269 /*
270 * OCSP Stapling options
271 */
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"
287 "(`on', `off')")
289 "SSL stapling switch to send tryLater response to client on error "
290 "(`on', `off')")
292 "SSL stapling option for OCSP Response Error Cache Lifetime")
294 "SSL stapling option to Force the OCSP Stapling URL")
295#endif
296
297#ifdef HAVE_SSL_CONF_CMD
299 "OpenSSL configuration command")
300#endif
301
302 /* Deprecated directives. */
304 "SSLLog directive is no longer supported - use ErrorLog."),
306 "SSLLogLevel directive is no longer supported - use LogLevel."),
307
309};
310
311/*
312 * the various processing hooks
313 */
314static int modssl_is_prelinked(void)
315{
316 apr_size_t i = 0;
317 const module *mod;
318 while ((mod = ap_prelinked_modules[i++])) {
319 if (strcmp(mod->name, "mod_ssl.c") == 0) {
320 return 1;
321 }
322 }
323 return 0;
324}
325
327{
328#if HAVE_OPENSSL_INIT_SSL || (OPENSSL_VERSION_NUMBER >= 0x10100000L && \
329 !defined(LIBRESSL_VERSION_NUMBER))
330 /* Openssl v1.1+ handles all termination automatically from
331 * OPENSSL_init_ssl(). Do nothing in this case.
332 */
333
334#else
335 /* Termination below is for legacy Openssl versions v1.0.x and
336 * older.
337 */
338
339 /* Corresponds to OBJ_create()s */
340 OBJ_cleanup();
341 /* Corresponds to OPENSSL_load_builtin_modules() */
343 /* Corresponds to SSL_library_init: */
344 EVP_cleanup();
345#if HAVE_ENGINE_LOAD_BUILTIN_ENGINES
347#endif
348#if OPENSSL_VERSION_NUMBER >= 0x1000200fL
349#ifndef OPENSSL_NO_COMP
351#endif
352#endif
353
354 /* Usually needed per thread, but this parent process is single-threaded */
355#if MODSSL_USE_OPENSSL_PRE_1_1_API
356#if OPENSSL_VERSION_NUMBER >= 0x1000000fL
358#else
360#endif
361#endif
362
363 /* Don't call ERR_free_strings in earlier versions, ERR_load_*_strings only
364 * actually loaded the error strings once per process due to static
365 * variable abuse in OpenSSL. */
366#if (OPENSSL_VERSION_NUMBER >= 0x00090805f)
368#endif
369
370 /* Also don't call CRYPTO_cleanup_all_ex_data when linked statically here;
371 * any registered ex_data indices may have been cached in static variables
372 * in OpenSSL; removing them may cause havoc. Notably, with OpenSSL
373 * versions >= 0.9.8f, COMP_CTX cleanups would not be run, which
374 * could result in a per-connection memory leak (!). */
377 }
378#endif
379
380 /*
381 * TODO: determine somewhere we can safely shove out diagnostics
382 * (when enabled) at this late stage in the game:
383 * CRYPTO_mem_leaks_fp(stderr);
384 */
385
386 return APR_SUCCESS;
387}
388
391 apr_pool_t *ptemp)
392{
394
395#if HAVE_OPENSSL_INIT_SSL || (OPENSSL_VERSION_NUMBER >= 0x10100000L && \
396 !defined(LIBRESSL_VERSION_NUMBER))
397 /* Openssl v1.1+ handles all initialisation automatically, apart
398 * from hints as to how we want to use the library.
399 *
400 * We tell openssl we want to include engine support.
401 */
403
404#else
405 /* Configuration below is for legacy versions Openssl v1.0 and
406 * older.
407 */
408
409#if APR_HAS_THREADS && MODSSL_USE_OPENSSL_PRE_1_1_API
411#endif
412#if MODSSL_USE_OPENSSL_PRE_1_1_API || defined(LIBRESSL_VERSION_NUMBER)
413 (void)CRYPTO_malloc_init();
414#else
416#endif
420#if HAVE_ENGINE_LOAD_BUILTIN_ENGINES
422#endif
425#endif
426
427 if (OBJ_txt2nid("id-on-dnsSRV") == NID_undef) {
428 (void)OBJ_create("1.3.6.1.5.5.7.8.7", "id-on-dnsSRV",
429 "SRVName otherName form");
430 }
431
432 /* Start w/o errors (e.g. OBJ_txt2nid() above) */
434
435 /*
436 * Let us cleanup the ssl library when the module is unloaded
437 */
440
441 /* Register us to handle mod_log_config %c/%x variables */
443
444 /* Register to handle mod_status status page generation */
446
447 /* Register mutex type names so they can be configured with Mutex */
449#ifdef HAVE_OCSP_STAPLING
454#endif
455
456 return OK;
457}
458
460 ap_conf_vector_t *per_dir_config,
461 int reinit)
462{
464 int need_setup = 0;
465
466 /* mod_proxy's (r->)per_dir_config has the lifetime of the request, thus
467 * it uses ssl_engine_set() to reset sslconn->dc when reusing SSL backend
468 * connections, so we must fall through here. But in the case where we are
469 * called from ssl_init_ssl_connection() with no per_dir_config (which also
470 * includes mod_proxy's later run_pre_connection call), sslconn->dc should
471 * be preserved if it's already set.
472 */
473 if (!sslconn) {
474 sslconn = apr_pcalloc(c->pool, sizeof(*sslconn));
475 need_setup = 1;
476 }
477 else if (!reinit) {
478 return sslconn;
479 }
480
481 /* Reinit dc in any case because it may be r->per_dir_config scoped
482 * and thus a caller like mod_proxy needs to update it per request.
483 */
484 if (per_dir_config) {
485 sslconn->dc = ap_get_module_config(per_dir_config, &ssl_module);
486 }
487 else {
488 sslconn->dc = ap_get_module_config(c->base_server->lookup_defaults,
489 &ssl_module);
490 }
491
492 if (need_setup) {
493 sslconn->server = c->base_server;
494 sslconn->verify_depth = UNSET;
495 if (c->outgoing) {
496 sslconn->cipher_suite = sslconn->dc->proxy->auth.cipher_suite;
497 }
498 else {
499 SSLSrvConfigRec *sc = mySrvConfig(c->base_server);
500 sslconn->cipher_suite = sc->server->auth.cipher_suite;
501 }
502
504 }
505
506 return sslconn;
507}
508
510{
511 if (c->master) {
512 return DECLINED;
513 }
514 if (sslconn) {
515 /* This connection has already been configured. Check what applies. */
516 if (sslconn->disabled) {
517 return SUSPENDED;
518 }
519 if (c->outgoing) {
520 if (!sslconn->dc->proxy_enabled) {
521 return DECLINED;
522 }
523 }
524 else {
525 if (mySrvConfig(sslconn->server)->enabled != SSL_ENABLED_TRUE) {
526 return DECLINED;
527 }
528 }
529 }
530 else {
531 /* we decline by default for outgoing connections and for incoming
532 * where the base_server is not enabled. */
533 if (c->outgoing || mySrvConfig(c->base_server)->enabled != SSL_ENABLED_TRUE) {
534 return DECLINED;
535 }
536 }
537 return OK;
538}
539
541 ap_conf_vector_t *per_dir_config,
542 int enable_ssl)
543{
545 int status;
546
547 sslconn = ssl_init_connection_ctx(c, per_dir_config, 1);
548 if (sslconn->ssl) {
549 /* we are already bound to this connection. We have rebound
550 * or removed the reference to a previous per_dir_config,
551 * there is nothing more to do. */
552 return OK;
553 }
554
556 if (enable_ssl) {
557 if (status != OK) {
558 SSLSrvConfigRec *sc = mySrvConfig(sslconn->server);
559 sslconn->disabled = 1;
561 "SSL Proxy requested for %s but not enabled for us.",
562 sc->vhost_id);
563 }
564 else {
565 sslconn->disabled = 0;
566 return OK;
567 }
568 }
569 else {
570 sslconn->disabled = 1;
571 }
572 return DECLINED;
573}
574
576{
577 SSLSrvConfigRec *sc;
578 SSL *ssl;
580 char *vhost_md5;
581 int rc;
584
585 /*
586 * Create or retrieve SSL context
587 */
589 server = sslconn->server;
590 sc = mySrvConfig(server);
591
592 /*
593 * Seed the Pseudo Random Number Generator (PRNG)
594 */
596 c->outgoing ? "Proxy: " : "Server: ");
597
598 mctx = myConnCtxConfig(c, sc);
599
600 /*
601 * Create a new SSL connection with the configured server SSL context and
602 * attach this to the socket. Additionally we register this attachment
603 * so we can detach later.
604 */
605 if (!(sslconn->ssl = ssl = SSL_new(mctx->ssl_ctx))) {
607 "Unable to create a new SSL connection from the SSL "
608 "context");
610
611 c->aborted = 1;
612
613 return DECLINED; /* XXX */
614 }
615
616 rc = ssl_run_pre_handshake(c, ssl, c->outgoing ? 1 : 0);
617 if (rc != OK && rc != DECLINED) {
618 return rc;
619 }
620
621 vhost_md5 = ap_md5_binary(c->pool, (unsigned char *)sc->vhost_id,
622 sc->vhost_id_len);
623
624 if (!SSL_set_session_id_context(ssl, (unsigned char *)vhost_md5,
626 {
628 "Unable to set session id context to '%s'", vhost_md5);
630
631 c->aborted = 1;
632
633 return DECLINED; /* XXX */
634 }
635
636 SSL_set_app_data(ssl, c);
637 modssl_set_app_data2(ssl, NULL); /* will be request_rec */
638
640
641 ssl_io_filter_init(c, r, ssl);
642
643 return APR_SUCCESS;
644}
645
646static const char *ssl_hook_http_scheme(const request_rec *r)
647{
648 return modssl_request_is_tls(r, NULL) ? "https" : NULL;
649}
650
652{
653 return modssl_request_is_tls(r, NULL) ? 443 : 0;
654}
655
657{
658 SSLSrvConfigRec *sc;
660
661 /*
662 * Immediately stop processing if SSL is disabled for this connection
663 */
664 if (ssl_engine_status(c, sslconn) != OK) {
665 return DECLINED;
666 }
667
668 if (sslconn) {
669 sc = mySrvConfig(sslconn->server);
670 }
671 else {
672 sc = mySrvConfig(c->base_server);
673 }
674
675 /*
676 * Remember the connection information for
677 * later access inside callback functions
678 */
679
681 "Connection to child %ld established "
682 "(server %s)", c->id, sc->vhost_id);
683
685}
686
688{
690
691 if (sslconn && !sslconn->disabled) {
692 /* On an active SSL connection, let the input filters initialize
693 * themselves which triggers the handshake, which again triggers
694 * all kinds of useful things such as SNI and ALPN.
695 */
697
698 temp = apr_brigade_create(c->pool, c->bucket_alloc);
699 ap_get_brigade(c->input_filters, temp,
702 }
703
704 return DECLINED;
705}
706
707/*
708 * the module registration phase
709 */
710
712{
713 /* ssl_hook_ReadReq needs to use the BrowserMatch settings so must
714 * run after mod_setenvif's post_read_request hook. */
715 static const char *pre_prr[] = { "mod_setenvif.c", NULL };
716 /* The ssl_init_Module post_config hook should run before mod_proxy's
717 * for the ssl proxy main configs to be merged with vhosts' before being
718 * themselves merged with mod_proxy's in proxy_hook_section_post_config.
719 */
720 static const char *b_pc[] = { "mod_proxy.c", NULL};
721
722
724
742
746
749
754
759}
760
761module AP_MODULE_DECLARE_DATA ssl_module = {
762 STANDARD20_MODULE_STUFF,
763 ssl_config_perdir_create, /* create per-dir config structures */
764 ssl_config_perdir_merge, /* merge per-dir config structures */
765 ssl_config_server_create, /* create per-server config structures */
766 ssl_config_server_merge, /* merge per-server config structures */
767 ssl_config_cmds, /* table of configuration directives */
768 ssl_register_hooks /* register hooks */
769#if defined(AP_MODULE_HAS_FLAGS)
770 ,AP_MODULE_FLAG_ALWAYS_MERGE /* flags */
771#endif
772};
Apache Provider API.
void ap_hook_process_connection(ap_HOOK_process_connection_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
Definition connection.c:42
void ap_hook_pre_connection(ap_HOOK_pre_connection_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
Definition connection.c:43
static apr_pool_t * pconf
Definition event.c:441
#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)
Definition config.c:105
void ap_hook_test_config(ap_HOOK_test_config_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
Definition config.c:100
struct ap_conf_vector_t ap_conf_vector_t
const char * ap_set_deprecated(cmd_parms *cmd, void *struct_ptr, const char *arg)
Definition config.c:1557
#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)
Definition config.c:91
request_rec * r
void ap_hook_child_init(ap_HOOK_child_init_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
Definition config.c:167
@ RAW_ARGS
Definition http_config.h:50
@ TAKE12
Definition http_config.h:61
@ TAKE1
Definition http_config.h:51
@ TAKE23
Definition http_config.h:63
@ TAKE2
Definition http_config.h:52
@ FLAG
Definition http_config.h:59
@ NO_ARGS
Definition http_config.h:60
void * csd
#define DECLINED
Definition httpd.h:457
#define OK
Definition httpd.h:456
#define SUSPENDED
Definition httpd.h:461
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)
#define APLOGNO(n)
Definition http_log.h:117
#define APLOG_INFO
Definition http_log.h:70
#define APLOG_ERR
Definition http_log.h:67
#define ap_log_cerror
Definition http_log.h:498
#define APLOG_MARK
Definition http_log.h:283
#define APLOG_DEBUG
Definition http_log.h:71
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)
Definition util_mutex.c:254
void ap_hook_http_scheme(ap_HOOK_http_scheme_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
Definition protocol.c:2589
void ap_hook_post_read_request(ap_HOOK_post_read_request_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
Definition protocol.c:2585
void ap_hook_default_port(ap_HOOK_default_port_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
Definition protocol.c:2591
void ap_hook_ssl_bind_outgoing(ap_HOOK_ssl_bind_outgoing_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
Definition ssl.c:285
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)
Definition request.c:2179
#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)
Definition request.c:2194
void ap_hook_fixups(ap_HOOK_fixups_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
Definition request.c:87
void ap_hook_check_authn(ap_HOOK_check_user_id_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder, int type)
Definition request.c:2218
void ap_hook_check_authz(ap_HOOK_auth_checker_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder, int type)
Definition request.c:2230
#define APR_MD5_DIGESTSIZE
Definition apr_md5.h:68
@ APR_BLOCK_READ
Definition apr_buckets.h:58
#define APR_HOOK_FIRST
Definition apr_hooks.h:301
#define APR_HOOK_MIDDLE
Definition apr_hooks.h:303
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)
apr_redis_t * rc
Definition apr_redis.h:173
#define OR_ALL
@ OPTIONS
Definition mod_proxy.h:84
const authz_provider ssl_authz_provider_require_ssl
#define SSLLOG_MARK
int modssl_request_is_tls(const request_rec *r, SSLConnRec **sslconn)
Definition ssl_util.c:103
int ssl_hook_Fixup(request_rec *r)
int ssl_hook_Auth(request_rec *r)
#define mySrvConfig(srv)
int ssl_init_ssl_connection(conn_rec *c, request_rec *r)
Definition mod_ssl.c:575
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)
Definition ssl_scache.c:234
#define myConnConfig(c)
#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)
@ SSL_ENABLED_TRUE
@ SSL_RSCTX_CONNECT
void modssl_set_app_data2(SSL *ssl, void *arg)
int ssl_run_pre_handshake(conn_rec *c, SSL *ssl, int is_proxy)
Definition mod_ssl.c:42
apr_size_t size
#define APR_SUCCESS
Definition apr_errno.h:225
int apr_status_t
Definition apr_errno.h:44
void * data
apr_vformatter_buff_t * c
Definition apr_lib.h:175
apr_uint16_t apr_port_t
#define apr_pcalloc(p, size)
Definition apr_pools.h:465
@ APR_LOCK_DEFAULT
int int status
Apache Configuration.
apr_pool_t * p
Definition md_event.c:32
#define AUTHZ_PROVIDER_VERSION
Definition mod_auth.h:42
#define AUTHZ_PROVIDER_GROUP
Definition mod_auth.h:40
#define UNSET
Proxy Extension Module for Apache.
return NULL
Definition mod_so.c:359
int i
Definition mod_so.c:347
static const command_rec ssl_config_cmds[]
Definition mod_ssl.c:66
#define SSL_PROTOCOLS
#define SSL_CMD_SRV(name, args, desc)
Definition mod_ssl.c:52
static SSLConnRec * ssl_init_connection_ctx(conn_rec *c, ap_conf_vector_t *per_dir_config, int reinit)
Definition mod_ssl.c:459
static apr_status_t ssl_cleanup_pre_config(void *data)
Definition mod_ssl.c:326
static int ssl_hook_pre_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp)
Definition mod_ssl.c:389
static int ssl_engine_status(conn_rec *c, SSLConnRec *sslconn)
Definition mod_ssl.c:509
static void ssl_register_hooks(apr_pool_t *p)
Definition mod_ssl.c:711
static const char * ssl_hook_http_scheme(const request_rec *r)
Definition mod_ssl.c:646
static int ssl_hook_pre_connection(conn_rec *c, void *csd)
Definition mod_ssl.c:656
#define AP_END_CMD
Definition mod_ssl.c:64
static int ssl_hook_ssl_bind_outgoing(conn_rec *c, ap_conf_vector_t *per_dir_config, int enable_ssl)
Definition mod_ssl.c:540
#define SSL_CMD_DIR(name, type, args, desc)
Definition mod_ssl.c:60
static int modssl_is_prelinked(void)
Definition mod_ssl.c:314
#define SSL_CMD_PXY(name, args, desc)
Definition mod_ssl.c:56
static int ssl_hook_process_connection(conn_rec *c)
Definition mod_ssl.c:687
static apr_port_t ssl_hook_default_port(const request_rec *r)
Definition mod_ssl.c:651
static int modssl_running_statically
Definition mod_ssl.c:38
#define SSL_CMD_ALL(name, args, desc)
Definition mod_ssl.c:48
Internal interfaces private to mod_ssl.
const char * vhost_id
modssl_ctx_t * server
Structure to store things which are per connection.
Definition httpd.h:1152
const char * cipher_suite
modssl_auth_ctx_t auth
A structure that represents the current request.
Definition httpd.h:845
struct ap_conf_vector_t * per_dir_config
Definition httpd.h:1047
A structure to store information for each virtual server.
Definition httpd.h:1322
@ AP_MODE_INIT
Definition util_filter.h:62
char * ap_md5_binary(apr_pool_t *p, const unsigned char *buf, int length)
Definition util_md5.c:53
Apache MD5 library.
Apache Mutex support library.