Add TLS on an interface.
3594 tls =
malloc (
sizeof ( *tls ) );
3599 memset ( tls, 0,
sizeof ( *tls ) );
static void free_tls(struct refcnt *refcnt)
Free TLS connection.
struct arbelprm_rc_send_wqe rc
struct process process
TX process.
struct tls_session * session
Session.
struct io_buffer rx_header_iobuf
Current received record header (static I/O buffer)
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 x509_root root_certificates
Root certificates.
static struct private_key * privkey_get(struct private_key *key)
Get reference to private key.
struct tls_header rx_header
Current received record header.
struct x509_root * root
Root of trust.
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.
#define ENOMEM
Not enough space.
struct tls_cipherspec tx_cipherspec
Current TX cipher specification.
#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_client_random client_random
Client random bytes.
struct interface cipherstream
Ciphertext stream.
struct private_key * key
Private key.
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 rx_cipherspec
Current RX cipher specification.
void * malloc(size_t size)
Allocate memory.
struct tls_cipherspec tx_cipherspec_pending
Next TX cipher specification.
#define TLS_VERSION_MAX
Maximum supported TLS version.
struct list_head rx_data
List of received data buffers.
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.
struct interface validator
Certificate validator.
static struct process_descriptor tls_process_desc
TLS TX process descriptor.
struct tls_cipherspec rx_cipherspec_pending
Next RX cipher specification.
uint16_t version
Protocol version.
static void tls_clear_handshake(struct tls_connection *tls)
Clear handshake digest algorithm.
static void tls_clear_cipher(struct tls_connection *tls, struct tls_cipherspec *cipherspec)
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.
uint64_t time
Current time.
#define NULL
NULL pointer (VOID *)
#define ref_put(refcnt)
Drop reference to object.
void * memset(void *dest, int character, size_t len) __nonnull