asynciodebian/masterproxy-ticket
Last change
on this file since c0fc11e was
c0fc11e,
checked in by Fiona Klute <fiona.klute@…>, 4 years ago
|
Separate functions for default SNI and loading virtual host credentials
The default SNI method using gnutls_server_name_get() won't be
necessary with early SNI parsing, but needs to remain available as a
fallback for old GnuTLS versions.
Loading virtual host credentials should happen in a separate function
so it can easily happen in pre or post client hello hooks alike.
|
-
Property mode set to
100644
|
File size:
1.2 KB
|
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 | |
---|
20 | int mgs_sni_ext_hook(void *ctx, unsigned tls_id, |
---|
21 | const unsigned char *data, unsigned size); |
---|
22 | |
---|
23 | |
---|
24 | /** |
---|
25 | * Wrapper for gnutls_server_name_get(): Retrieve SNI data from the |
---|
26 | * TLS session associated with the connection, store it in a string |
---|
27 | * allocated from the connection pool. |
---|
28 | * |
---|
29 | * Note that `ctxt->sni_name` is not automatically updated. |
---|
30 | * |
---|
31 | * @param ctxt the connection to read from |
---|
32 | * |
---|
33 | * @return the requested server name, or NULL. |
---|
34 | */ |
---|
35 | const char* mgs_server_name_get(mgs_handle_t *ctxt); |
---|
36 | |
---|
37 | #endif /* __MOD_GNUTLS_SNI_H__ */ |
---|
Note: See
TracBrowser
for help on using the repository browser.