Changeset e7cf823 in mod_gnutls
- Timestamp:
- Apr 10, 2018, 12:18:26 PM (5 years ago)
- Branches:
- asyncio, debian/master, debian/stretch-backports, main, master, proxy-ticket, upstream
- Children:
- 2f10643
- Parents:
- 4cdd4fd
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
include/mod_gnutls.h.in
r4cdd4fd re7cf823 470 470 int mgs_hook_pre_connection(conn_rec * c, void *csd); 471 471 472 int mgs_hook_process_connection(conn_rec* c); 473 472 474 int mgs_hook_fixups(request_rec *r); 473 475 -
src/gnutls_hooks.c
r4cdd4fd re7cf823 1076 1076 } 1077 1077 1078 1079 1080 /** 1081 * process_connection hook: Do a zero byte read to trigger the 1082 * handshake. Doesn't change anything for traditional protocols that 1083 * just do reads, but HTTP/2 needs the TLS handshake and ALPN to 1084 * happen before its process_connection hook runs. 1085 */ 1086 int mgs_hook_process_connection(conn_rec* c) 1087 { 1088 mgs_handle_t *ctxt = (mgs_handle_t *) 1089 ap_get_module_config(c->conn_config, &gnutls_module); 1090 1091 if ((ctxt != NULL) && (ctxt->enabled == GNUTLS_ENABLED_TRUE)) 1092 { 1093 /* This connection is supposed to use TLS. Give the filters a 1094 * kick with a zero byte read to trigger the handshake. */ 1095 apr_bucket_brigade* temp = 1096 apr_brigade_create(c->pool, c->bucket_alloc); 1097 ap_get_brigade(c->input_filters, temp, 1098 AP_MODE_INIT, APR_BLOCK_READ, 0); 1099 apr_brigade_destroy(temp); 1100 } 1101 return DECLINED; 1102 } 1103 1104 1105 1078 1106 int mgs_hook_fixups(request_rec * r) { 1079 1107 unsigned char sbuf[GNUTLS_MAX_SESSION_ID]; -
src/mod_gnutls.c
r4cdd4fd re7cf823 30 30 int proxy, int enable); 31 31 32 static const char * const mod_proxy[] = { "mod_proxy.c", NULL }; 33 static const char * const mod_http2[] = { "mod_http2.c", NULL }; 34 32 35 static void gnutls_hooks(apr_pool_t * p __attribute__((unused))) 33 36 { 34 37 /* Try Run Post-Config Hook After mod_proxy */ 35 static const char * const aszPre[] = { "mod_proxy.c", NULL }; 36 ap_hook_post_config(mgs_hook_post_config, aszPre, NULL, 37 APR_HOOK_REALLY_LAST); 38 ap_hook_post_config(mgs_hook_post_config, mod_proxy, mod_http2, 39 APR_HOOK_MIDDLE); 38 40 /* HTTP Scheme Hook */ 39 41 ap_hook_http_scheme(mgs_hook_http_scheme, NULL, NULL, APR_HOOK_MIDDLE); … … 41 43 ap_hook_default_port(mgs_hook_default_port, NULL, NULL, APR_HOOK_MIDDLE); 42 44 /* Pre-Connect Hook */ 43 ap_hook_pre_connection(mgs_hook_pre_connection, NULL, NULL,45 ap_hook_pre_connection(mgs_hook_pre_connection, mod_http2, NULL, 44 46 APR_HOOK_MIDDLE); 47 ap_hook_process_connection(mgs_hook_process_connection, 48 NULL, mod_http2, APR_HOOK_MIDDLE); 45 49 /* Pre-Config Hook */ 46 50 ap_hook_pre_config(mgs_hook_pre_config, NULL, NULL,
Note: See TracChangeset
for help on using the changeset viewer.