- Timestamp:
- Jan 21, 2015, 5:29:48 AM (6 years ago)
- Branches:
- asyncio, debian/master, debian/stretch-backports, jessie-backports, master, proxy-ticket, upstream
- Children:
- 07d548d
- Parents:
- c4ba9722
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mod_gnutls.c
rc4ba9722 raccbb83 28 28 /* Try Run Post-Config Hook After mod_proxy */ 29 29 static const char * const aszPre[] = { "mod_proxy.c", NULL }; 30 ap_hook_post_config(mgs_hook_post_config, aszPre, NULL,APR_HOOK_REALLY_LAST); 30 ap_hook_post_config(mgs_hook_post_config, aszPre, NULL, 31 APR_HOOK_REALLY_LAST); 31 32 /* HTTP Scheme Hook */ 32 33 #if USING_2_1_RECENT … … 36 37 #endif 37 38 /* Default Port Hook */ 38 ap_hook_default_port(mgs_hook_default_port, NULL,NULL, APR_HOOK_MIDDLE);39 ap_hook_default_port(mgs_hook_default_port, NULL, NULL, APR_HOOK_MIDDLE); 39 40 /* Pre-Connect Hook */ 40 ap_hook_pre_connection(mgs_hook_pre_connection, NULL, NULL, APR_HOOK_MIDDLE); 41 ap_hook_pre_connection(mgs_hook_pre_connection, NULL, NULL, 42 APR_HOOK_MIDDLE); 41 43 /* Pre-Config Hook */ 42 44 ap_hook_pre_config(mgs_hook_pre_config, NULL, NULL, 43 APR_HOOK_MIDDLE);45 APR_HOOK_MIDDLE); 44 46 /* Child-Init Hook */ 45 47 ap_hook_child_init(mgs_hook_child_init, NULL, NULL, 46 APR_HOOK_MIDDLE);48 APR_HOOK_MIDDLE); 47 49 /* Authentication Hook */ 48 50 ap_hook_access_checker(mgs_hook_authz, NULL, NULL, 49 APR_HOOK_REALLY_FIRST);51 APR_HOOK_REALLY_FIRST); 50 52 /* Fixups Hook */ 51 53 ap_hook_fixups(mgs_hook_fixups, NULL, NULL, APR_HOOK_REALLY_FIRST); … … 57 59 58 60 /* Input Filter */ 59 ap_register_input_filter(GNUTLS_INPUT_FILTER_NAME, 60 mgs_filter_input, NULL,AP_FTYPE_CONNECTION + 5);61 ap_register_input_filter(GNUTLS_INPUT_FILTER_NAME, mgs_filter_input, 62 NULL, AP_FTYPE_CONNECTION + 5); 61 63 /* Output Filter */ 62 ap_register_output_filter(GNUTLS_OUTPUT_FILTER_NAME, 63 mgs_filter_output, NULL,AP_FTYPE_CONNECTION + 5);64 ap_register_output_filter(GNUTLS_OUTPUT_FILTER_NAME, mgs_filter_output, 65 NULL, AP_FTYPE_CONNECTION + 5); 64 66 65 67 /* mod_proxy calls these functions */ … … 68 70 } 69 71 70 int ssl_is_https(conn_rec *c) { 72 int ssl_is_https(conn_rec *c) 73 { 71 74 mgs_srvconf_rec *sc = (mgs_srvconf_rec *) 72 75 ap_get_module_config(c->base_server->module_config, &gnutls_module); 73 76 if(sc->enabled == 0 || sc->non_ssl_request == 1) { 74 77 /* SSL/TLS Disabled or Plain HTTP Connection Detected */ … … 88 91 89 92 /* disable TLS for this connection */ 90 mgs_handle_t *ctxt = (mgs_handle_t *) ap_get_module_config(c->conn_config, &gnutls_module); 93 mgs_handle_t *ctxt = (mgs_handle_t *) 94 ap_get_module_config(c->conn_config, &gnutls_module); 91 95 if (ctxt == NULL) 92 96 { 93 ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c, "%s: allocating connection memory", __func__); 97 ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c, 98 "%s: allocating connection memory", __func__); 94 99 ctxt = apr_pcalloc(c->pool, sizeof (*ctxt)); 95 100 ap_set_module_config(c->conn_config, &gnutls_module, ctxt); … … 105 110 } 106 111 107 int ssl_proxy_enable(conn_rec *c) { 112 int ssl_proxy_enable(conn_rec *c) 113 { 108 114 mgs_srvconf_rec *sc = (mgs_srvconf_rec *) 109 115 ap_get_module_config(c->base_server->module_config, &gnutls_module); 110 116 sc->proxy_enabled = GNUTLS_ENABLED_TRUE; 111 117 sc->enabled = GNUTLS_ENABLED_FALSE;
Note: See TracChangeset
for help on using the changeset viewer.