Apache HTTPD
Classes | Macros | Typedefs | Functions
tls_proto.h File Reference
#include "tls_util.h"

Go to the source code of this file.

Classes

struct  tls_cipher_t
 
struct  tls_proto_conf_t
 

Macros

#define TLS_VERSION_1_2   0x0303
 
#define TLS_VERSION_1_3   0x0304
 

Typedefs

typedef struct tls_proto_conf_t tls_proto_conf_t
 

Functions

tls_proto_conf_t * tls_proto_init (apr_pool_t *p, server_rec *s)
 
apr_status_t tls_proto_pre_config (apr_pool_t *pool, apr_pool_t *ptemp)
 
apr_status_t tls_proto_post_config (apr_pool_t *p, apr_pool_t *ptemp, server_rec *s)
 
apr_uint16_t tls_proto_get_version_by_name (tls_proto_conf_t *conf, const char *name)
 
const char * tls_proto_get_version_name (tls_proto_conf_t *conf, apr_uint16_t id, 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)
 
apr_status_t tls_proto_get_cipher_by_name (tls_proto_conf_t *conf, const char *name, apr_uint16_t *pcipher)
 
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)
 
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_get_rustls_suites (tls_proto_conf_t *conf, const apr_array_header_t *ids, apr_pool_t *pool)
 

Macro Definition Documentation

◆ TLS_VERSION_1_2

#define TLS_VERSION_1_2   0x0303

Definition at line 22 of file tls_proto.h.

◆ TLS_VERSION_1_3

#define TLS_VERSION_1_3   0x0304

Definition at line 23 of file tls_proto.h.

Typedef Documentation

◆ tls_proto_conf_t

TLS protocol related definitions constructed by querying crustls lib.

Definition at line 39 of file tls_proto.h.

Function Documentation

◆ tls_proto_create_versions_plus()

apr_array_header_t * tls_proto_create_versions_plus ( tls_proto_conf_t *  conf,
apr_uint16_t  min_version,
apr_pool_t *  pool 
)

Create an array of the given TLS protocol version identifier min_version and all supported new ones. The array carries apr_uint16_t values.

Definition at line 544 of file tls_proto.c.

◆ tls_proto_get_cipher_by_name()

apr_status_t tls_proto_get_cipher_by_name ( tls_proto_conf_t *  conf,
const char *  name,
apr_uint16_t *  pcipher 
)

Get a TLS cipher spec by name/alias.

Definition at line 565 of file tls_proto.c.

◆ tls_proto_get_cipher_name()

const char * tls_proto_get_cipher_name ( tls_proto_conf_t *  conf,
apr_uint16_t  cipher,
apr_pool_t *  pool 
)

Get the name of a TLS cipher for the IANA assigned 16bit value. This will return the name in the protocol configuration, if the cipher is known, and create the string TLS_CIPHER_0x%04x for the 16bit cipher value.

Definition at line 576 of file tls_proto.c.

◆ tls_proto_get_cipher_names()

const char * tls_proto_get_cipher_names ( tls_proto_conf_t *  conf,
const apr_array_header_t *  ciphers,
apr_pool_t *  pool 
)

Get the concatenated names with ':' as separator of all TLS cipher identifiers as given in ciphers.

Parameters
confthe TLS protocol configuration
ciphersthe 16bit values of the TLS ciphers
poolto use for allocation the string.

Definition at line 464 of file tls_proto.c.

◆ tls_proto_get_rustls_suites()

apr_array_header_t * tls_proto_get_rustls_suites ( tls_proto_conf_t *  conf,
const apr_array_header_t *  ids,
apr_pool_t *  pool 
)

Convert an array of TLS cipher 16bit identifiers into the rustls_supported_ciphersuite instances that can be passed to crustls in session configurations. Any cipher identifier not supported by rustls we be silently omitted.

Definition at line 586 of file tls_proto.c.

◆ tls_proto_get_version_by_name()

apr_uint16_t tls_proto_get_version_by_name ( tls_proto_conf_t *  conf,
const char *  name 
)

Get the TLS protocol identifier (as used on the wire) for the TLS protocol of the given name. Returns 0 if protocol is unknown.

Definition at line 514 of file tls_proto.c.

◆ tls_proto_get_version_name()

const char * tls_proto_get_version_name ( tls_proto_conf_t *  conf,
apr_uint16_t  id,
apr_pool_t *  pool 
)

Get the name of the protocol version identified by its identifier. This will return the name from the protocol configuration or, if unknown, create the string TLSv0x%04x from the 16bit identifier.

Definition at line 530 of file tls_proto.c.

◆ tls_proto_init()

tls_proto_conf_t * tls_proto_init ( apr_pool_t *  p,
server_rec *  s 
)

Create and populate the protocol configuration.

Definition at line 420 of file tls_proto.c.

◆ tls_proto_is_cipher_supported()

int tls_proto_is_cipher_supported ( tls_proto_conf_t *  conf,
apr_uint16_t  cipher 
)

Return != 0 iff the cipher is supported by the rustls library.

Definition at line 560 of file tls_proto.c.

◆ tls_proto_post_config()

apr_status_t tls_proto_post_config ( apr_pool_t *  p,
apr_pool_t *  ptemp,
server_rec *  s 
)

Called during post-config phase to conclude the initialization of the tls protocol configuration.

Definition at line 485 of file tls_proto.c.

◆ tls_proto_pre_config()

apr_status_t tls_proto_pre_config ( apr_pool_t *  pool,
apr_pool_t *  ptemp 
)

Called during pre-config phase to start initialization of the tls protocol configuration.

Definition at line 478 of file tls_proto.c.