source: mod_gnutls/src/gnutls_sni.h @ 7ff6c6c

debian/masterproxy-ticket
Last change on this file since 7ff6c6c was 7ff6c6c, checked in by Fiona Klute <fiona.klute@…>, 23 months ago

Add proof-of-concept SNI parser in a pre client hello hook

The SNI parser is complete, but right now the hook only retrieves the
SNI data and logs it. The goal is to select the right virtual host and
load ALPN parameters (and possibly others) before GnuTLS processes the
ClientHello? message. That should make different "Protocols" directives
between virtual hosts work as expected.

  • Property mode set to 100644
File size: 813 bytes
Line 
1/*
2 *  Copyright 2018 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_SNI_H__
18#define __MOD_GNUTLS_SNI_H__
19
20int mgs_sni_ext_hook(void *ctx, unsigned tls_id,
21                     const unsigned char *data, unsigned size);
22
23#endif /* __MOD_GNUTLS_SNI_H__ */
Note: See TracBrowser for help on using the repository browser.