main
Last change
on this file since e809a17a was
eb21e89,
checked in by Fiona Klute <fiona.klute@…>, 20 months ago
|
Fix server_rec references in mgs_get_ocsp_response()
During the handshake the base_server of the relevant conn_rec is
always the first vhost matching the host/port combination of the
incoming connection. By the time an OCSP response is requested
mod_gnutls may already have selected another server based on SNI, but
Apache hasn't updated the conn_rec yet. In that case c->base_server
does not refer to the right server, and if that server reference is
used to get the mod_gnutls configuration it'll be the wrong one.
That behavior caused a bug where caching a fresh OCSP response during
handshake failed if the initial vhost had OCSP stapling disabled,
because with stapling disabled the cache lifetime is set to -1. In
other cases a wrong cache lifetime might have been used.
The bug is fixed by using the mod_gnutls server configuration
referenced by the mod_gnutls connection structure, which has already
been updated by the SNI parsing code. It contains a reference to the
correct server_rec.
This commit also contains a regression test.
|
-
Property mode set to
100644
|
File size:
468 bytes
|
Line | |
---|
1 | !connection |
---|
2 | description: >- |
---|
3 | Regression test: Sending OCSP requests during handshake incorrectly |
---|
4 | used the OCSP stapling options of the first virtual host. Check that |
---|
5 | the problem remains fixed by configuring a first virtual host with |
---|
6 | stapling disabled and connecting to the second one. |
---|
7 | gnutls_params: |
---|
8 | - x509cafile=authority/x509.pem |
---|
9 | - ocsp |
---|
10 | actions: |
---|
11 | - !request |
---|
12 | path: /test.txt |
---|
13 | expect: |
---|
14 | status: 200 |
---|
15 | body: |
---|
16 | exactly: | |
---|
17 | test |
---|
Note: See
TracBrowser
for help on using the repository browser.