Add TLS on an interface.
3805 tls =
malloc (
sizeof ( *tls ) );
3810 memset ( tls, 0,
sizeof ( *tls ) );
static void free_tls(struct refcnt *refcnt)
Free TLS connection.
struct tls_header header
Current received record header.
struct arbelprm_rc_send_wqe rc
struct process process
Transmit process.
struct tls_session * session
Session.
struct list_head data
List of received data buffers.
static void tls_restart(struct tls_connection *tls)
Restart negotiation.
struct stp_switch root
Root switch.
#define ref_init(refcnt, free)
Initialise a reference counter.
struct refcnt refcnt
Reference counter.
struct tls_cipherspec_pair cipherspec
Cipher specifications.
struct x509_root root_certificates
Root certificates.
static struct private_key * privkey_get(struct private_key *key)
Get reference to private key.
static void iob_populate(struct io_buffer *iobuf, void *data, size_t len, size_t max_len)
Create a temporary I/O buffer.
static struct interface_descriptor tls_cipherstream_desc
TLS ciphertext stream interface descriptor.
static struct interface_descriptor tls_validator_desc
TLS certificate validator interface descriptor.
struct private_key * key
Private key (if used)
struct tls_server server
Server state.
#define ENOMEM
Not enough space.
struct tls_client client
Client state.
#define list_add_tail(new, head)
Add a new entry to the tail of a list.
struct list_head list
List of connections within the same session.
uint32_t gmt_unix_time
GMT Unix time.
static struct x509_root * x509_root_get(struct x509_root *root)
Get reference to X.509 root certificate list.
struct tls_cipherspec_pair cipherspec
Cipher specifications.
struct interface cipherstream
Ciphertext stream.
static void process_init_stopped(struct process *process, struct process_descriptor *desc, struct refcnt *refcnt)
Initialise process without adding to process list.
struct tls_cipherspec pending
Next cipher specification.
void * malloc(size_t size)
Allocate memory.
struct tls_rx rx
Receive state.
#define TLS_VERSION_MAX
Maximum supported TLS version.
struct tls_tx tx
Transmit state.
static struct interface_descriptor tls_plainstream_desc
TLS plaintext stream interface descriptor.
void intf_insert(struct interface *intf, struct interface *upper, struct interface *lower)
Insert a filter interface.
#define INIT_LIST_HEAD(list)
Initialise a list head.
uint8_t random[28]
Random data.
static struct process_descriptor tls_process_desc
TLS TX process descriptor.
struct io_buffer iobuf
Current received record header (static I/O buffer)
struct interface validator
Certificate validator.
uint16_t version
Protocol version.
static void tls_clear_handshake(struct tls_connection *tls)
Clear handshake digest algorithm.
struct tls_cipherspec active
Current cipher specification.
static void tls_clear_cipher(struct tls_connection *tls, struct tls_cipherspec *cipherspec)
struct tls_client_random random
Random bytes.
struct list_head conn
List of connections.
static int tls_generate_random(struct tls_connection *tls, void *data, size_t len)
Generate random data.
static void intf_init(struct interface *intf, struct interface_descriptor *desc, struct refcnt *refcnt)
Initialise an object interface.
struct interface plainstream
Plaintext stream.
#define NULL
NULL pointer (VOID *)
#define ref_put(refcnt)
Drop reference to object.
void * memset(void *dest, int character, size_t len) __nonnull
struct x509_root * root
Root of trust.