Changeset e7cf823 in mod_gnutls for src/gnutls_hooks.c
- Timestamp:
- Apr 10, 2018, 12:18:26 PM (3 years ago)
- Branches:
- asyncio, debian/master, debian/stretch-backports, master, proxy-ticket, upstream
- Children:
- 2f10643
- Parents:
- 4cdd4fd
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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];
Note: See TracChangeset
for help on using the changeset viewer.