source: mod_gnutls/src/gnutls_proxy.h @ d827d0c

asyncio
Last change on this file since d827d0c was d827d0c, checked in by Fiona Klute <fiona.klute@…>, 18 months ago

Create cache keys for proxy session tickets

The key is based on the vhost name, backend server hostname (from SNI)
or IP, and its port. The vhost name is included because different
vhosts may have different settings for the same backend server. Post
handshake auth is not supported for proxy connections, so we do not
need to consider auth IDs.

  • Property mode set to 100644
File size: 1.8 KB
Line 
1/*
2 *  Copyright 2015-2020 Fiona Klute
3 *
4 *  Licensed under the Apache License, Version 2.0 (the "License");
5 *  you may not use this file except in compliance with the License.
6 *  You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 *  Unless required by applicable law or agreed to in writing, software
11 *  distributed under the License is distributed on an "AS IS" BASIS,
12 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 *  See the License for the specific language governing permissions and
14 *  limitations under the License.
15 */
16
17#ifndef __MOD_GNUTLS_PROXY_H__
18#define __MOD_GNUTLS_PROXY_H__
19
20#include <apr_errno.h>
21#include <apr_pools.h>
22#include <httpd.h>
23
24/** proxy modules may add a note with this key to the
25 * connection->notes table for client connections to indicate the
26 * server hostname */
27#define PROXY_SNI_NOTE "proxy-request-hostname"
28
29/** proxy modules may add a note with this key to the connection->notes
30 * table for client connections to indicate supported protocols */
31#define PROXY_ALPN_NOTE "proxy-request-alpn-protos"
32
33apr_status_t load_proxy_x509_credentials(apr_pool_t *pconf,
34                                         apr_pool_t *ptemp,
35                                         server_rec *s)
36    __attribute__((nonnull));
37
38/**
39 * Configure extensions for the TLS handshake on proxy connections,
40 * currently SNI and ALPN.
41 */
42void mgs_set_proxy_handshake_ext(mgs_handle_t * ctxt);
43
44/**
45 * Create a cache key for a session ticket of a proxy connection.
46 *
47 * @param ctxt The proxy connection handle (mod_gnutls is client)
48 *
49 * @param pool Pool to allocate the string from, if `NULL` the
50 * connection pool is used
51 *
52 * @return string to be used as cache key
53 */
54char *mgs_proxy_ticket_id(mgs_handle_t *ctxt, apr_pool_t *pool);
55
56#endif /* __MOD_GNUTLS_PROXY_H__ */
Note: See TracBrowser for help on using the repository browser.