Apache2
tls_proto.h
Go to the documentation of this file.
1 /* Licensed to the Apache Software Foundation (ASF) under one or more
2  * contributor license agreements. See the NOTICE file distributed with
3  * this work for additional information regarding copyright ownership.
4  * The ASF licenses this file to You under the Apache License, Version 2.0
5  * (the "License"); you may not use this file except in compliance with
6  * the License. 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 #ifndef tls_proto_h
17 #define tls_proto_h
18 
19 #include "tls_util.h"
20 
21 
22 #define TLS_VERSION_1_2 0x0303
23 #define TLS_VERSION_1_3 0x0304
24 
29 typedef struct {
30  apr_uint16_t id; /* IANA 16-bit assigned value as used on the wire */
31  const char *name; /* IANA given name of the cipher */
32  const char *alias; /* Optional, commonly known alternate name */
33 } tls_cipher_t;
34 
39 typedef struct tls_proto_conf_t tls_proto_conf_t;
41  apr_array_header_t *supported_versions; /* supported protocol versions (apr_uint16_t) */
42  apr_hash_t *known_ciphers_by_name; /* hash by name of known tls_cipher_t* */
43  apr_hash_t *known_ciphers_by_id; /* hash by id of known tls_cipher_t* */
44  apr_hash_t *rustls_ciphers_by_id; /* hash by id of rustls rustls_supported_ciphersuite* */
45  apr_array_header_t *supported_cipher_ids; /* cipher ids (apr_uint16_t) supported by rustls */
46  const rustls_root_cert_store *native_roots;
47 };
48 
53 
59 
65 
71 
79 
86 
91  tls_proto_conf_t *conf, const char *name, apr_uint16_t *pcipher);
92 
97 
105 
115 
123 
124 #endif /* tls_proto_h */
const char * s
Definition: mod_dav.h:1327
apr_bucket_brigade request_rec apr_pool_t * pool
Definition: mod_dav.h:557
const char * name
Definition: mod_dav.h:805
proxy_worker proxy_server_conf * conf
Definition: mod_proxy.h:657
int apr_status_t
Definition: apr_errno.h:44
struct apr_hash_t apr_hash_t
Definition: apr_hash.h:52
unsigned short apr_uint16_t
Definition: apr.h:345
struct apr_pool_t apr_pool_t
Definition: apr_pools.h:60
Definition: apr_tables.h:62
A structure to store information for each virtual server.
Definition: httpd.h:1382
Definition: tls_proto.h:29
apr_uint16_t id
Definition: tls_proto.h:30
const char * name
Definition: tls_proto.h:31
const char * alias
Definition: tls_proto.h:32
Definition: tls_proto.h:40
apr_hash_t * known_ciphers_by_id
Definition: tls_proto.h:43
apr_hash_t * known_ciphers_by_name
Definition: tls_proto.h:42
apr_hash_t * rustls_ciphers_by_id
Definition: tls_proto.h:44
const rustls_root_cert_store * native_roots
Definition: tls_proto.h:46
apr_array_header_t * supported_cipher_ids
Definition: tls_proto.h:45
apr_array_header_t * supported_versions
Definition: tls_proto.h:41
apr_pool_t * p
apr_array_header_t * tls_proto_get_rustls_suites(tls_proto_conf_t *conf, const apr_array_header_t *ids, apr_pool_t *pool)
const char * tls_proto_get_version_name(tls_proto_conf_t *conf, apr_uint16_t id, apr_pool_t *pool)
apr_status_t tls_proto_get_cipher_by_name(tls_proto_conf_t *conf, const char *name, apr_uint16_t *pcipher)
apr_status_t tls_proto_pre_config(apr_pool_t *pool, apr_pool_t *ptemp)
apr_uint16_t tls_proto_get_version_by_name(tls_proto_conf_t *conf, const char *name)
int tls_proto_is_cipher_supported(tls_proto_conf_t *conf, apr_uint16_t cipher)
const char * tls_proto_get_cipher_name(tls_proto_conf_t *conf, apr_uint16_t cipher, apr_pool_t *pool)
apr_status_t tls_proto_post_config(apr_pool_t *p, apr_pool_t *ptemp, server_rec *s)
const char * tls_proto_get_cipher_names(tls_proto_conf_t *conf, const apr_array_header_t *ciphers, apr_pool_t *pool)
apr_array_header_t * tls_proto_create_versions_plus(tls_proto_conf_t *conf, apr_uint16_t min_version, apr_pool_t *pool)
tls_proto_conf_t * tls_proto_init(apr_pool_t *p, server_rec *s)