source: mod_gnutls/src/gnutls_proxy.h @ 411d286

Last change on this file since 411d286 was 411d286, checked in by Fiona Klute <fiona.klute@…>, 6 months ago

Store session tickets for proxy connections in the session cache

The cache key is stored in the session context because it will be
needed for every proxy connection: For checking if there is a cached
ticket (not implemented yet), and to store new tickets if any.

  • Property mode set to 100644
File size: 1.9 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 `gnutls_datum_t` containing the string to be used as cache
53 * key as `data` and its size (`strlen()`) as `size`.
54 */
55gnutls_datum_t mgs_proxy_ticket_id(mgs_handle_t *ctxt, apr_pool_t *pool);
56
57#endif /* __MOD_GNUTLS_PROXY_H__ */
Note: See TracBrowser for help on using the repository browser.