MCPcopy Create free account
hub / github.com/apache/httpd / fill_reneg_buffer

Function fill_reneg_buffer

modules/ssl/ssl_engine_kernel.c:80–101  ·  view source on GitHub ↗

If a renegotiation is required for the location, and the request * includes a message body (and the client has not requested a "100 * Continue" response), then the client will be streaming the request * body over the wire already. In that case, it is not possible to * stop and perform a new SSL handshake immediately; once the SSL * library moves to the "accept" state, it will reject the SSL

Source from the content-addressed store, hash-verified

78 * error code on failure.
79 */
80static int fill_reneg_buffer(request_rec *r, SSLDirConfigRec *dc)
81{
82 int rv;
83 apr_size_t rsize;
84
85 /* ### this is HTTP/1.1 specific, special case for protocol? */
86 if (r->expecting_100 || !ap_request_has_body(r)) {
87 return 0;
88 }
89
90 rsize = dc->nRenegBufferSize == UNSET ? DEFAULT_RENEG_BUFFER_SIZE : dc->nRenegBufferSize;
91 if (rsize > 0) {
92 /* Fill the I/O buffer with the request body if possible. */
93 rv = ssl_io_buffer_fill(r, rsize);
94 }
95 else {
96 /* If the reneg buffer size is set to zero, just fail. */
97 rv = HTTP_REQUEST_ENTITY_TOO_LARGE;
98 }
99
100 return rv;
101}
102
103#ifdef HAVE_TLSEXT
104/* Check whether a transition from vhost sc1 to sc2 from SNI to Host:

Callers 2

ssl_hook_Access_classicFunction · 0.85
ssl_hook_Access_modernFunction · 0.85

Calls 2

ap_request_has_bodyFunction · 0.85
ssl_io_buffer_fillFunction · 0.85

Tested by

no test coverage detected