Apache HTTPD
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
29typedef 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 */
34
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 */
47};
48
53
59
65
71
79
86
91 tls_proto_conf_t *conf, const char *name, apr_uint16_t *pcipher);
92
97
103const char *tls_proto_get_cipher_name(
105
115
123
124#endif /* tls_proto_h */
apr_size_t size
const char int apr_pool_t * pool
Definition apr_cstr.h:84
int apr_status_t
Definition apr_errno.h:44
const char * s
Definition apr_strings.h:95
apr_pool_t * p
Definition md_event.c:32
char * name
A structure to store information for each virtual server.
Definition httpd.h:1322
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
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
const char * tls_proto_get_cipher_names(tls_proto_conf_t *conf, const apr_array_header_t *ciphers, apr_pool_t *pool)
Definition tls_proto.c:464
tls_proto_conf_t * tls_proto_init(apr_pool_t *p, server_rec *s)
Definition tls_proto.c:420
apr_status_t tls_proto_get_cipher_by_name(tls_proto_conf_t *conf, const char *name, apr_uint16_t *pcipher)
Definition tls_proto.c:565
apr_status_t tls_proto_pre_config(apr_pool_t *pool, apr_pool_t *ptemp)
Definition tls_proto.c:478
apr_uint16_t tls_proto_get_version_by_name(tls_proto_conf_t *conf, const char *name)
Definition tls_proto.c:514
int tls_proto_is_cipher_supported(tls_proto_conf_t *conf, apr_uint16_t cipher)
Definition tls_proto.c:560
const char * tls_proto_get_cipher_name(tls_proto_conf_t *conf, apr_uint16_t cipher, apr_pool_t *pool)
Definition tls_proto.c:576
const char * tls_proto_get_version_name(tls_proto_conf_t *conf, apr_uint16_t id, apr_pool_t *pool)
Definition tls_proto.c:530
apr_status_t tls_proto_post_config(apr_pool_t *p, apr_pool_t *ptemp, server_rec *s)
Definition tls_proto.c:485
apr_array_header_t * tls_proto_create_versions_plus(tls_proto_conf_t *conf, apr_uint16_t min_version, apr_pool_t *pool)
Definition tls_proto.c:544
apr_array_header_t * tls_proto_get_rustls_suites(tls_proto_conf_t *conf, const apr_array_header_t *ids, apr_pool_t *pool)
Definition tls_proto.c:586