|
iPXE
|
Transport Layer Security Protocol. More...
#include <stdint.h>#include <stdlib.h>#include <stdarg.h>#include <stdio.h>#include <string.h>#include <errno.h>#include <byteswap.h>#include <ipxe/pending.h>#include <ipxe/hmac.h>#include <ipxe/md5_sha1.h>#include <ipxe/iobuf.h>#include <ipxe/xfer.h>#include <ipxe/open.h>#include <ipxe/x509.h>#include <ipxe/privkey.h>#include <ipxe/certstore.h>#include <ipxe/rootcert.h>#include <ipxe/validator.h>#include <ipxe/job.h>#include <ipxe/ffdhe.h>#include <ipxe/tls.h>#include <config/crypto.h>Go to the source code of this file.
Data Structures | |
| struct | tls24_t |
| A TLS 24-bit integer. More... | |
Functions | |
| FILE_LICENCE (GPL2_OR_LATER) | |
| FILE_SECBOOT (PERMITTED) | |
| static | LIST_HEAD (tls_sessions) |
| List of TLS session. | |
| static void | tls_tx_resume_all (struct tls_session *session) |
| Resume TX state machine for all connections within a session. | |
| static struct io_buffer * | tls_alloc_iob (struct tls_connection *tls, size_t len) |
| Allocate I/O buffer for transmitted record(s). | |
| static int | tls_send_alert (struct tls_connection *tls, unsigned int level, unsigned int description) |
| Transmit Alert record. | |
| static int | tls_send_record (struct tls_connection *tls, unsigned int type, struct io_buffer *iobuf) |
| Send plaintext record(s). | |
| static int | tls_send_plaintext (struct tls_connection *tls, unsigned int type, const void *data, size_t len) |
| Send plaintext record. | |
| static void | tls_clear_digest (struct tls_connection *tls) |
| Clear key schedule digest algorithm. | |
| static void | tls_clear_cipher (struct tls_connection *tls, struct tls_cipherspec *cipherspec) |
| static unsigned long | tls_uint24 (const tls24_t *field24) |
| Extract 24-bit field value. | |
| static void | tls_set_uint24 (tls24_t *field24, unsigned long value) |
| Set 24-bit field value. | |
| static int | tls_ready (struct tls_connection *tls) |
| Determine if TLS connection is ready for application data. | |
| static int | tls_version (struct tls_connection *tls, unsigned int version) |
| Check for TLS version. | |
| static const char * | tls_pipe_name (struct tls_connection *tls, struct secure_pipe *pipe) |
| Get pipe name (for debugging). | |
| static void | free_tls_session (struct refcnt *refcnt) |
| Free TLS session. | |
| static void | free_tls (struct refcnt *refcnt) |
| Free TLS connection. | |
| static void | tls_close (struct tls_connection *tls, int rc) |
| Finish with TLS connection. | |
| static void | tls_close_alert (struct tls_connection *tls, int rc) |
| Send closure alert and finish with TLS connection. | |
| static void | tls_nonce (struct tls_connection *tls, struct tls_random *nonce) |
| Generate deterministic connection nonce. | |
| static int | tls_set_digest (struct tls_connection *tls, struct digest_algorithm *digest) |
| Set key schedule digest algorithm. | |
| static const char * | tls_cipher_name (struct tls_cipher_suite *suite) |
| Get cipher suite name (for debugging). | |
| static struct tls_cipher_suite * | tls_find_cipher_suite (unsigned int cipher_suite) |
| Identify cipher suite. | |
| static void | tls_clear_cipher (struct tls_connection *tls __unused, struct tls_cipherspec *cipherspec) |
| Clear cipher specification. | |
| static int | tls_set_cipher (struct tls_connection *tls, struct tls_cipherspec *cipherspec, struct tls_cipher_suite *suite) |
| Set cipher specification. | |
| static int | tls_select_cipher (struct tls_connection *tls, unsigned int cipher_suite) |
| Select cipher suite. | |
| static int | tls_change_cipher (struct tls_connection *tls, struct tls_cipherspec_pair *pair, struct secure_pipe *pipe) |
| Activate next cipher suite. | |
| static struct tls_signature_hash_algorithm * | tls_signature_hash_algorithm (struct pubkey_algorithm *pubkey, struct digest_algorithm *digest) |
| Find TLS signature and hash algorithm. | |
| static struct tls_signature_hash_algorithm * | tls_find_signature_hash (unsigned int code) |
| Find TLS signature and hash algorithm. | |
| static struct tls_named_group * | tls_find_named_group (unsigned int named_group) |
| Identify named key exchange group. | |
| static struct tls_named_group * | tls_find_param_group (const void *dh_p, size_t dh_p_len, const void *dh_g, size_t dh_g_len) |
| Identify named key exchange group by Diffie-Hellman parameters. | |
| static int | tls_parse_null (struct tls_connection *tls, const void *data, size_t len, struct tls_key_exchange_parameters *params __unused) |
| Parse key exchange parameters from unexpected Server Key Exchange record. | |
| static int | tls_parse_dhe (struct tls_connection *tls, const void *data, size_t len, struct tls_key_exchange_parameters *params) |
| Parse key exchange parameters from DHE Server Key Exchange record. | |
| static int | tls_parse_ecdhe (struct tls_connection *tls, const void *data, size_t len, struct tls_key_exchange_parameters *params) |
| Parse key exchange parameters from ECDHE Server Key Exchange record. | |
| static int | tls_keysize_is_variable (struct tls_connection *tls, struct exchange_algorithm *exchange) |
| Check if key exchange keys have a variable size. | |
| static int | tls_key_share (struct tls_connection *tls, struct exchange_algorithm *exchange, void *public, size_t len) |
| Share public key. | |
| static int | tls_key_agree (struct tls_connection *tls, struct exchange_algorithm *exchange, const void *partner, size_t len) |
| Agree shared secret. | |
| static int | tls_key_encrypt (struct tls_connection *tls, struct exchange_algorithm *exchange, struct asn1_builder *builder) |
| Encrypt (and implicitly bind) shared secret. | |
| static int | tls_key_build (struct tls_connection *tls, struct exchange_algorithm *exchange, struct asn1_builder *builder) |
| Build shareable key. | |
| static void | tls_channel_reset (struct secure_channel *channel) |
| Reset the key schedule. | |
| static int | tls_channel_apply (struct secure_channel *channel, struct exchange_algorithm *exchange, const void *shared, int *accumulated) |
| Apply a new shared secret to key schedule. | |
| static int | tls_channel_save (struct secure_channel *channel, struct secure_preshared_identity *psid) |
| Save a pre-shared key for future resumption of the key schedule. | |
| static int | tls_channel_load (struct secure_channel *channel, struct secure_preshared_identity *psid) |
| Load a pre-shared key and resume the key schedule. | |
| static int | tls_channel_verify (struct secure_channel *channel, const void *auth, size_t len) |
| Verify authenticator value. | |
| static int | tls_session (struct tls_connection *tls, const char *name) |
| Find or create session for TLS connection. | |
| static int | tls_save (struct tls_connection *tls) |
| Save session for future resumption. | |
| static int | tls_resume (struct tls_connection *tls) |
| Resume session. | |
| static int | tls_add_handshake (struct tls_connection *tls, const void *data, size_t len) |
| Add handshake record to verification hash. | |
| static void | tls_tx_resume (struct tls_connection *tls) |
| Resume TX state machine. | |
| static void | tls_restart (struct tls_connection *tls) |
| Restart negotiation. | |
| static int | tls_establish (struct tls_connection *tls) |
| Establish secure channel. | |
| static int | tls_send_handshake (struct tls_connection *tls, const void *data, size_t len) |
| Transmit Handshake record. | |
| static int | tls_client_hello (struct tls_connection *tls, int(*action)(struct tls_connection *tls, const void *data, size_t len)) |
| Digest or transmit Client Hello record. | |
| static int | tls_send_client_hello (struct tls_connection *tls) |
| Transmit Client Hello record. | |
| static int | tls_send_certificate (struct tls_connection *tls) |
| Transmit Certificate record. | |
| static int | tls_send_client_key_exchange (struct tls_connection *tls) |
| Transmit Client Key Exchange record. | |
| static int | tls_send_certificate_verify (struct tls_connection *tls) |
| Transmit Certificate Verify record. | |
| static int | tls_send_change_cipher (struct tls_connection *tls) |
| Transmit Change Cipher record. | |
| static int | tls_send_finished (struct tls_connection *tls) |
| Transmit Finished record. | |
| static int | tls_new_change_cipher (struct tls_connection *tls, struct io_buffer *iobuf) |
| Receive new Change Cipher record. | |
| static int | tls_new_alert (struct tls_connection *tls, struct io_buffer *iobuf) |
| Receive new Alert record. | |
| static int | tls_new_hello_request (struct tls_connection *tls, const void *data __unused, size_t len __unused) |
| Receive new Hello Request handshake record. | |
| static int | tls_new_server_hello (struct tls_connection *tls, const void *data, size_t len) |
| Receive new Server Hello handshake record. | |
| static int | tls_new_session_ticket (struct tls_connection *tls, const void *data, size_t len) |
| Receive New Session Ticket handshake record. | |
| static int | tls_parse_chain (struct tls_connection *tls, const void *data, size_t len) |
| Parse certificate chain. | |
| static int | tls_new_certificate (struct tls_connection *tls, const void *data, size_t len) |
| Receive new Certificate handshake record. | |
| static int | tls_new_server_key_exchange (struct tls_connection *tls, const void *data, size_t len) |
| Receive new Server Key Exchange handshake record. | |
| static int | tls_new_certificate_request (struct tls_connection *tls, const void *data __unused, size_t len __unused) |
| Receive new Certificate Request handshake record. | |
| static int | tls_new_server_hello_done (struct tls_connection *tls, const void *data, size_t len) |
| Receive new Server Hello Done handshake record. | |
| static int | tls_new_finished (struct tls_connection *tls, const void *data, size_t len) |
| Receive new Finished handshake record. | |
| static int | tls_new_handshake (struct tls_connection *tls, struct io_buffer *iobuf) |
| Receive new Handshake record. | |
| static int | tls_new_unknown (struct tls_connection *tls __unused, struct io_buffer *iobuf) |
| Receive new unknown record. | |
| static int | tls_new_data (struct tls_connection *tls, struct list_head *rx_data) |
| Receive new data record. | |
| static int | tls_new_record (struct tls_connection *tls, unsigned int type, struct list_head *rx_data) |
| Receive new record. | |
| static void | tls_hmac_init (struct tls_cipherspec *cipherspec, void *ctx, struct tls_auth_header *authhdr) |
| Initialise HMAC. | |
| static void | tls_hmac_update (struct tls_cipherspec *cipherspec, void *ctx, const void *data, size_t len) |
| Update HMAC. | |
| static void | tls_hmac_final (struct tls_cipherspec *cipherspec, void *ctx, void *hmac) |
| Finalise HMAC. | |
| static void | tls_hmac (struct tls_cipherspec *cipherspec, struct tls_auth_header *authhdr, const void *data, size_t len, void *hmac) |
| Calculate HMAC. | |
| static void | tls_hmac_list (struct tls_cipherspec *cipherspec, struct tls_auth_header *authhdr, struct list_head *list, void *hmac) |
| Calculate HMAC over list of I/O buffers. | |
| static size_t | tls_iob_reserved (struct tls_connection *tls, size_t len) |
| Calculate maximum additional length required for transmitted record(s). | |
| static int | tls_verify_padding (struct tls_connection *tls, struct io_buffer *iobuf) |
| Verify block padding. | |
| static int | tls_new_ciphertext (struct tls_connection *tls, struct tls_header *tlshdr, struct list_head *rx_data) |
| Receive new ciphertext record. | |
| static size_t | tls_plainstream_window (struct tls_connection *tls) |
| Check flow control window. | |
| static int | tls_plainstream_deliver (struct tls_connection *tls, struct io_buffer *iobuf, struct xfer_metadata *meta __unused) |
| Deliver datagram as raw data. | |
| static int | tls_progress (struct tls_connection *tls, struct job_progress *progress) |
| Report job progress. | |
| static int | tls_newdata_process_header (struct tls_connection *tls) |
| Handle received TLS header. | |
| static int | tls_newdata_process_data (struct tls_connection *tls) |
| Handle received TLS data payload. | |
| static size_t | tls_cipherstream_window (struct tls_connection *tls) |
| Check flow control window. | |
| static int | tls_cipherstream_deliver (struct tls_connection *tls, struct io_buffer *iobuf, struct xfer_metadata *xfer __unused) |
| Receive new ciphertext. | |
| static void | tls_validator_done (struct tls_connection *tls, int rc) |
| Handle certificate validation completion. | |
| static void | tls_tx_step (struct tls_connection *tls) |
| TLS TX state machine. | |
| int | add_tls (struct interface *xfer, const char *name, struct x509_root *root, struct private_key *key) |
| Add TLS on an interface. | |
| REQUIRING_SYMBOL (add_tls) | |
| REQUIRE_OBJECT (config_crypto) | |
Variables | |
| struct tls_cipher_suite | tls_cipher_suite_null |
| Null cipher suite. | |
| struct tls_key_exchange_algorithm | tls_null_exchange_algorithm |
| Null key exchange algorithm. | |
| struct tls_key_exchange_algorithm | tls_pubkey_exchange_algorithm |
| Public key exchange algorithm. | |
| struct tls_key_exchange_algorithm | tls_dhe_exchange_algorithm |
| Ephemeral Diffie-Hellman key exchange algorithm. | |
| struct tls_key_exchange_algorithm | tls_ecdhe_exchange_algorithm |
| Ephemeral Elliptic Curve Diffie-Hellman key exchange algorithm. | |
| static struct secure_channel_operations | tls_channel_ops |
| Secure channel operations. | |
| static struct interface_operation | tls_plainstream_ops [] |
| TLS plaintext stream interface operations. | |
| static struct interface_descriptor | tls_plainstream_desc |
| TLS plaintext stream interface descriptor. | |
| static struct interface_operation | tls_cipherstream_ops [] |
| TLS ciphertext stream interface operations. | |
| static struct interface_descriptor | tls_cipherstream_desc |
| TLS ciphertext stream interface descriptor. | |
| static struct interface_operation | tls_validator_ops [] |
| TLS certificate validator interface operations. | |
| static struct interface_descriptor | tls_validator_desc |
| TLS certificate validator interface descriptor. | |
| static struct process_descriptor | tls_process_desc |
| TLS TX process descriptor. | |
Transport Layer Security Protocol.
Definition in file tls.c.
| #define EINVAL_CHANGE_CIPHER __einfo_error ( EINFO_EINVAL_CHANGE_CIPHER ) |
Definition at line 53 of file tls.c.
Referenced by tls_new_change_cipher().
| #define EINFO_EINVAL_CHANGE_CIPHER |
Definition at line 54 of file tls.c.
| #define EINVAL_ALERT __einfo_error ( EINFO_EINVAL_ALERT ) |
Definition at line 57 of file tls.c.
Referenced by tls_new_alert().
| #define EINFO_EINVAL_ALERT |
Definition at line 58 of file tls.c.
| #define EINVAL_HELLO __einfo_error ( EINFO_EINVAL_HELLO ) |
Definition at line 61 of file tls.c.
Referenced by tls_new_server_hello().
| #define EINFO_EINVAL_HELLO |
Definition at line 62 of file tls.c.
| #define EINVAL_CERTIFICATE __einfo_error ( EINFO_EINVAL_CERTIFICATE ) |
Definition at line 65 of file tls.c.
Referenced by tls_parse_chain().
| #define EINFO_EINVAL_CERTIFICATE |
Definition at line 66 of file tls.c.
| #define EINVAL_CERTIFICATES __einfo_error ( EINFO_EINVAL_CERTIFICATES ) |
Definition at line 69 of file tls.c.
Referenced by tls_new_certificate().
| #define EINFO_EINVAL_CERTIFICATES |
Definition at line 70 of file tls.c.
| #define EINVAL_HELLO_DONE __einfo_error ( EINFO_EINVAL_HELLO_DONE ) |
Definition at line 73 of file tls.c.
Referenced by tls_new_server_hello_done().
| #define EINFO_EINVAL_HELLO_DONE |
Definition at line 74 of file tls.c.
| #define EINVAL_FINISHED __einfo_error ( EINFO_EINVAL_FINISHED ) |
| #define EINFO_EINVAL_FINISHED |
Definition at line 78 of file tls.c.
| #define EINVAL_HANDSHAKE __einfo_error ( EINFO_EINVAL_HANDSHAKE ) |
| #define EINFO_EINVAL_HANDSHAKE |
Definition at line 82 of file tls.c.
| #define EINVAL_IV __einfo_error ( EINFO_EINVAL_IV ) |
Definition at line 85 of file tls.c.
Referenced by tls_new_ciphertext().
| #define EINFO_EINVAL_IV |
Definition at line 86 of file tls.c.
| #define EINVAL_PADDING __einfo_error ( EINFO_EINVAL_PADDING ) |
Definition at line 89 of file tls.c.
Referenced by tls_verify_padding().
| #define EINFO_EINVAL_PADDING |
Definition at line 90 of file tls.c.
| #define EINVAL_RX_STATE __einfo_error ( EINFO_EINVAL_RX_STATE ) |
Definition at line 93 of file tls.c.
Referenced by tls_cipherstream_deliver().
| #define EINFO_EINVAL_RX_STATE |
Definition at line 94 of file tls.c.
| #define EINVAL_MAC __einfo_error ( EINFO_EINVAL_MAC ) |
Definition at line 97 of file tls.c.
Referenced by tls_new_ciphertext().
| #define EINFO_EINVAL_MAC |
Definition at line 98 of file tls.c.
| #define EINVAL_TICKET __einfo_error ( EINFO_EINVAL_TICKET ) |
Definition at line 101 of file tls.c.
Referenced by tls_new_session_ticket().
| #define EINFO_EINVAL_TICKET |
Definition at line 102 of file tls.c.
| #define EINVAL_KEY_EXCHANGE __einfo_error ( EINFO_EINVAL_KEY_EXCHANGE ) |
Definition at line 105 of file tls.c.
Referenced by tls_key_agree(), tls_key_share(), tls_new_server_key_exchange(), tls_parse_dhe(), tls_parse_ecdhe(), and tls_parse_null().
| #define EINFO_EINVAL_KEY_EXCHANGE |
Definition at line 106 of file tls.c.
| #define EIO_ALERT __einfo_error ( EINFO_EIO_ALERT ) |
Definition at line 109 of file tls.c.
Referenced by tls_new_alert().
| #define EINFO_EIO_ALERT |
Definition at line 110 of file tls.c.
| #define ENOENT_CERT __einfo_error ( EINFO_ENOENT_CERT ) |
Definition at line 113 of file tls.c.
Referenced by tls_key_encrypt(), tls_new_server_key_exchange(), tls_send_certificate(), and tls_send_certificate_verify().
| #define EINFO_ENOENT_CERT |
Definition at line 114 of file tls.c.
| #define ENOENT_KEY_EXCHANGE __einfo_error ( EINFO_ENOENT_KEY_EXCHANGE ) |
Definition at line 117 of file tls.c.
Referenced by tls_send_client_key_exchange().
| #define EINFO_ENOENT_KEY_EXCHANGE |
Definition at line 118 of file tls.c.
| #define ENOMEM_CONTEXT __einfo_error ( EINFO_ENOMEM_CONTEXT ) |
Definition at line 121 of file tls.c.
Referenced by tls_set_cipher().
| #define EINFO_ENOMEM_CONTEXT |
Definition at line 122 of file tls.c.
| #define ENOMEM_CERTIFICATE __einfo_error ( EINFO_ENOMEM_CERTIFICATE ) |
Definition at line 125 of file tls.c.
Referenced by tls_send_certificate().
| #define EINFO_ENOMEM_CERTIFICATE |
Definition at line 126 of file tls.c.
| #define ENOMEM_CHAIN __einfo_error ( EINFO_ENOMEM_CHAIN ) |
Definition at line 129 of file tls.c.
Referenced by tls_parse_chain().
| #define EINFO_ENOMEM_CHAIN |
Definition at line 130 of file tls.c.
| #define ENOMEM_TX_PLAINTEXT __einfo_error ( EINFO_ENOMEM_TX_PLAINTEXT ) |
Definition at line 133 of file tls.c.
Referenced by tls_send_plaintext().
| #define EINFO_ENOMEM_TX_PLAINTEXT |
Definition at line 134 of file tls.c.
| #define ENOMEM_TX_CIPHERTEXT __einfo_error ( EINFO_ENOMEM_TX_CIPHERTEXT ) |
| #define EINFO_ENOMEM_TX_CIPHERTEXT |
Definition at line 138 of file tls.c.
| #define ENOMEM_RX_DATA __einfo_error ( EINFO_ENOMEM_RX_DATA ) |
Definition at line 141 of file tls.c.
Referenced by tls_newdata_process_header().
| #define EINFO_ENOMEM_RX_DATA |
Definition at line 142 of file tls.c.
| #define ENOMEM_RX_CONCAT __einfo_error ( EINFO_ENOMEM_RX_CONCAT ) |
Definition at line 145 of file tls.c.
Referenced by tls_new_record().
| #define EINFO_ENOMEM_RX_CONCAT |
Definition at line 146 of file tls.c.
| #define ENOTSUP_CIPHER __einfo_error ( EINFO_ENOTSUP_CIPHER ) |
Definition at line 149 of file tls.c.
Referenced by tls_select_cipher().
| #define EINFO_ENOTSUP_CIPHER |
Definition at line 150 of file tls.c.
| #define ENOTSUP_NULL __einfo_error ( EINFO_ENOTSUP_NULL ) |
Definition at line 153 of file tls.c.
Referenced by tls_change_cipher().
| #define EINFO_ENOTSUP_NULL |
Definition at line 154 of file tls.c.
| #define ENOTSUP_SIG_HASH __einfo_error ( EINFO_ENOTSUP_SIG_HASH ) |
Definition at line 157 of file tls.c.
Referenced by tls_new_server_key_exchange(), and tls_send_certificate_verify().
| #define EINFO_ENOTSUP_SIG_HASH |
Definition at line 158 of file tls.c.
| #define ENOTSUP_VERSION __einfo_error ( EINFO_ENOTSUP_VERSION ) |
| #define EINFO_ENOTSUP_VERSION |
Definition at line 162 of file tls.c.
| #define ENOTSUP_GROUP __einfo_error ( EINFO_ENOTSUP_GROUP ) |
Definition at line 165 of file tls.c.
Referenced by tls_parse_dhe(), and tls_parse_ecdhe().
| #define EINFO_ENOTSUP_GROUP |
Definition at line 166 of file tls.c.
| #define EPERM_ALERT __einfo_error ( EINFO_EPERM_ALERT ) |
Definition at line 169 of file tls.c.
Referenced by tls_new_alert().
| #define EINFO_EPERM_ALERT |
Definition at line 170 of file tls.c.
| #define EPERM_VERIFY __einfo_error ( EINFO_EPERM_VERIFY ) |
Definition at line 173 of file tls.c.
Referenced by tls_channel_verify().
| #define EINFO_EPERM_VERIFY |
Definition at line 174 of file tls.c.
| #define EPERM_RENEG_INSECURE __einfo_error ( EINFO_EPERM_RENEG_INSECURE ) |
Definition at line 177 of file tls.c.
Referenced by tls_new_hello_request().
| #define EINFO_EPERM_RENEG_INSECURE |
Definition at line 178 of file tls.c.
| #define EPERM_RENEG_VERIFY __einfo_error ( EINFO_EPERM_RENEG_VERIFY ) |
Definition at line 181 of file tls.c.
Referenced by tls_new_server_hello().
| #define EINFO_EPERM_RENEG_VERIFY |
Definition at line 182 of file tls.c.
| #define EPERM_KEY_EXCHANGE __einfo_error ( EINFO_EPERM_KEY_EXCHANGE ) |
Definition at line 185 of file tls.c.
Referenced by tls_new_server_key_exchange().
| #define EINFO_EPERM_KEY_EXCHANGE |
Definition at line 186 of file tls.c.
| #define EPERM_SAVE __einfo_error ( EINFO_EPERM_SAVE ) |
Definition at line 189 of file tls.c.
Referenced by tls_channel_save().
| #define EINFO_EPERM_SAVE |
Definition at line 190 of file tls.c.
| #define EPROTO_VERSION __einfo_error ( EINFO_EPROTO_VERSION ) |
Definition at line 193 of file tls.c.
Referenced by tls_new_server_hello().
| #define EINFO_EPROTO_VERSION |
Definition at line 194 of file tls.c.
| #define TLS_NUM_CIPHER_SUITES table_num_entries ( TLS_CIPHER_SUITES ) |
Number of supported cipher suites.
Definition at line 519 of file tls.c.
Referenced by tls_client_hello().
| #define TLS_NUM_SIG_HASH_ALGORITHMS table_num_entries ( TLS_SIG_HASH_ALGORITHMS ) |
Number of supported signature and hash algorithms.
Definition at line 750 of file tls.c.
Referenced by tls_client_hello().
| FILE_LICENCE | ( | GPL2_OR_LATER | ) |
| FILE_SECBOOT | ( | PERMITTED | ) |
|
static |
Resume TX state machine for all connections within a session.
| session | TLS session |
Definition at line 1552 of file tls.c.
References tls_session::conn, tls_connection::list, list_for_each_entry, tls_connection::session, and tls_tx_resume().
Referenced by tls_close(), and tls_establish().
|
static |
Allocate I/O buffer for transmitted record(s).
| tls | TLS connection |
| len | I/O buffer payload length |
| iobuf | I/O buffer |
Definition at line 3253 of file tls.c.
References tls_connection::cipherstream, iob_reserve, len, NULL, tls_iob_reserved(), and xfer_alloc_iob().
Referenced by tls_send_certificate(), and tls_send_plaintext().
|
static |
Transmit Alert record.
| tls | TLS connection |
| level | Alert level |
| description | Alert description |
| rc | Return status code |
Definition at line 2140 of file tls.c.
References __attribute__, alert(), tls_send_plaintext(), and TLS_TYPE_ALERT.
Referenced by tls_close_alert().
|
static |
Send plaintext record(s).
| tls | TLS connection |
| type | Record type |
| iobuf | I/O buffer |
| rc | Return status code |
Definition at line 3280 of file tls.c.
References __attribute__, tls_cipherspec_pair::active, assert, cipher_algorithm::authsize, cipher_algorithm::blocksize, tls_connection::channel, channel_ephemeral(), secure_pipe::cipher, tls_cipher_suite::cipher, cipher_auth(), cipher_encrypt, cipher_setiv(), tls_tx::cipherspec, tls_connection::cipherstream, cpu_to_be64, secure_pipe::ctx, io_buffer::data, DBGC, DBGC2, DBGC2_HDA, tls_cipher_suite::digest, digest_algorithm::digestsize, fixed, tls_cipherspec::fixed_iv, tls_cipher_suite::fixed_iv_len, free_iob(), tls_auth_header::header, htons, iob_disown, iob_len(), iob_push, iob_put, iob_unput, is_auth_cipher(), is_block_cipher(), iv, len, tls_header::length, mac, tls_cipher_suite::mac_len, memcpy(), memmove(), memset(), NULL, rc, tls_cipher_suite::record_iv_len, tls_auth_header::seq, tls_tx::seq, strerror(), tls_cipherspec::suite, tls_add_handshake(), tls_hmac(), tls_iob_reserved(), TLS_TX_BUFSIZE, TLS_TYPE_HANDSHAKE, secure_channel::tx, tls_connection::tx, tls_header::type, type, tls_connection::version, tls_header::version, and xfer_deliver_iob().
Referenced by tls_plainstream_deliver(), tls_send_certificate(), and tls_send_plaintext().
|
static |
Send plaintext record.
| rc | Return status code |
Definition at line 3432 of file tls.c.
References data, ENOMEM_TX_PLAINTEXT, iob_disown, iob_put, len, memcpy(), rc, tls_alloc_iob(), tls_send_record(), and type.
Referenced by tls_send_alert(), tls_send_change_cipher(), and tls_send_handshake().
|
static |
Clear key schedule digest algorithm.
| tls | TLS connection |
Definition at line 457 of file tls.c.
References tls_connection::channel, channel_unkey(), tls_connection::key, and tlskey_stop().
Referenced by add_tls(), free_tls(), and tls_set_digest().
|
static |
Referenced by add_tls(), free_tls(), tls_change_cipher(), and tls_set_cipher().
|
inlinestatic |
Extract 24-bit field value.
| field24 | 24-bit field |
| value | Field value |
Definition at line 241 of file tls.c.
References be16_to_cpu, tls24_t::high, and tls24_t::low.
Referenced by tls_new_certificate(), tls_new_handshake(), and tls_parse_chain().
|
static |
Set 24-bit field value.
| field24 | 24-bit field |
| value | Field value |
Definition at line 252 of file tls.c.
References cpu_to_be16, tls24_t::high, tls24_t::low, and value.
Referenced by tls_send_certificate().
|
static |
Determine if TLS connection is ready for application data.
| tls | TLS connection |
| is_ready | TLS connection is ready |
Definition at line 264 of file tls.c.
References tls_connection::channel, and channel_is_established().
Referenced by tls_cipherstream_window(), tls_new_data(), tls_new_hello_request(), tls_plainstream_deliver(), and tls_plainstream_window().
|
inlinestatic |
Check for TLS version.
| tls | TLS connection |
| version | TLS version |
| at_least | TLS connection is using at least the specified version |
Check that TLS connection uses at least the specified protocol version. Optimise down to a compile-time constant true result if this is already guaranteed by the minimum supported version check.
Definition at line 281 of file tls.c.
References TLS_VERSION_MIN, tls_connection::version, and version.
Referenced by tls_keysize_is_variable(), tls_new_server_key_exchange(), tls_select_cipher(), tls_send_certificate_verify(), and tls_set_digest().
|
static |
Get pipe name (for debugging).
| tls | TLS connection |
| pipe | Secure pipe |
| name | Secure pipe name |
Definition at line 293 of file tls.c.
References tls_connection::channel, secure_channel::rx, and secure_channel::tx.
Referenced by tls_change_cipher().
|
static |
Free TLS session.
| refcnt | Reference counter |
Definition at line 317 of file tls.c.
References assert, channel_clear_preshared(), tls_session::conn, container_of, tls_session_ticket::data, tls_session::key, tls_session::list, list_del, list_empty, privkey_put(), tls_session::psid, tls_session::root, tls_session::ticket, x509_root_put(), and zfree().
Referenced by tls_session().
|
static |
Free TLS connection.
| refcnt | Reference counter |
Definition at line 344 of file tls.c.
References tls_cipherspec_pair::active, assert, tls_client::chain, tls_server::chain, tls_rx::cipherspec, tls_tx::cipherspec, tls_connection::client, container_of, tls_rx::data, tls_session_ticket::data, free_iob(), tls_rx::handshake, tls_client::key, io_buffer::list, tls_connection::list, list_del, list_empty, list_for_each_entry_safe, tls_connection::new_ticket, tls_cipherspec_pair::pending, privkey_put(), ref_put, tls_session::refcnt, tls_server::root, tls_connection::rx, tls_connection::server, tls_connection::session, tls_clear_cipher(), tls_clear_digest(), tmp, tls_connection::tx, x509_chain_put(), x509_root_put(), and zfree().
Referenced by add_tls().
|
static |
Finish with TLS connection.
| tls | TLS connection |
| rc | Status code |
Definition at line 382 of file tls.c.
References tls_connection::channel, channel_close(), tls_connection::cipherstream, tls_connection::client, INIT_LIST_HEAD, intf_shutdown(), tls_connection::list, list_del, tls_client::negotiation, tls_server::negotiation, pending_put(), tls_connection::plainstream, tls_tx::process, process_del(), rc, tls_connection::server, tls_connection::session, tls_tx_resume_all(), tls_connection::tx, tls_server::validation, and tls_server::validator.
Referenced by tls_close_alert(), and tls_new_alert().
|
static |
Send closure alert and finish with TLS connection.
| tls | TLS connection |
| rc | Status code |
Definition at line 414 of file tls.c.
References rc, TLS_ALERT_CLOSE_NOTIFY, TLS_ALERT_WARNING, tls_close(), and tls_send_alert().
Referenced by tls_cipherstream_deliver(), tls_tx_step(), and tls_validator_done().
|
static |
Generate deterministic connection nonce.
| tls | TLS connection |
| random | Connection nonce to fill in |
The nonce is guaranteed to be deterministic and to be unique for each connection (or renegotiation within a connection).
We choose to regenerate it afresh whenever the value is required (rather than generating it once and storing it) so that it is impossible to accidentally use a stale nonce.
Definition at line 443 of file tls.c.
References tls_connection::channel, channel_ephemeral_label(), and nonce.
Referenced by tls_client_hello(), and tls_set_digest().
|
static |
Set key schedule digest algorithm.
| tls | TLS connection |
| digest | Key schedule digest algorithm |
| rc | Return status code |
Definition at line 473 of file tls.c.
References DBGC, tls_connection::key, nonce, op, rc, strerror(), tls_clear_digest(), tls_nonce(), tls_version(), TLS_VERSION_TLS_1_2, tlskey_hash, tlskey_md5_sha1, and tlskey_start().
Referenced by tls_select_cipher().
|
static |
Get cipher suite name (for debugging).
| suite | Cipher suite |
| name | Cipher suite name |
Definition at line 527 of file tls.c.
References tls_cipher_suite::cipher, tls_cipher_suite::digest, digest_null, tls_cipher_suite::exchange, tls_key_exchange_algorithm::exchange, tls_cipher_suite::handshake, tls_cipher_suite::key_len, cipher_algorithm::name, digest_algorithm::name, pubkey_algorithm::name, tls_key_exchange_algorithm::name, NULL, tls_cipher_suite::pubkey, pubkey_null, snprintf(), and tls_pubkey_exchange_algorithm.
Referenced by tls_change_cipher(), and tls_select_cipher().
|
static |
Identify cipher suite.
| cipher_suite | Cipher suite specification |
| suite | Cipher suite, or NULL |
Definition at line 563 of file tls.c.
References tls_cipher_suite::code, for_each_table_entry, NULL, and TLS_CIPHER_SUITES.
Referenced by tls_select_cipher().
|
static |
Clear cipher specification.
| cipherspec | TLS cipher specification |
Definition at line 580 of file tls.c.
References __unused, tls_cipherspec::dynamic, memset(), tls_cipherspec::suite, tls_cipher_suite_null, and zfree().
|
static |
Set cipher specification.
| tls | TLS connection |
| cipherspec | TLS cipher specification |
| suite | Cipher suite |
| rc | Return status code |
Definition at line 596 of file tls.c.
References assert, tls_cipherspec::cipher_key, DBGC, tls_cipherspec::dynamic, ENOMEM_CONTEXT, tls_cipherspec::fixed_iv, tls_cipher_suite::fixed_iv_len, tls_cipher_suite::key_len, tls_cipher_suite::mac_len, tls_cipherspec::mac_secret, tls_cipherspec::suite, tls_clear_cipher(), and zalloc().
Referenced by tls_select_cipher().
|
static |
Select cipher suite.
| tls | TLS connection |
| cipher_suite | Cipher suite specification |
| rc | Return status code |
Definition at line 634 of file tls.c.
References tls_cipher_suite::cipher, tls_rx::cipherspec, tls_tx::cipherspec, DBGC, tls_cipher_suite::digest, ENOTSUP_CIPHER, tls_cipher_suite::exchange, tls_connection::exchange, tls_key_exchange_algorithm::exchange, tls_cipher_suite::handshake, md5_sha1_algorithm, ntohs, tls_cipherspec_pair::pending, tls_cipher_suite::pubkey, rc, tls_connection::rx, tls_cipher_name(), tls_find_cipher_suite(), tls_set_cipher(), tls_set_digest(), tls_version(), TLS_VERSION_TLS_1_2, and tls_connection::tx.
Referenced by tls_new_server_hello().
|
static |
Activate next cipher suite.
| tls | TLS connection |
| pair | Cipher specification pair |
| pipe | Secure pipe |
| rc | Return status code |
Definition at line 686 of file tls.c.
References tls_cipherspec_pair::active, tls_connection::channel, channel_set_cipher(), tls_cipher_suite::cipher, DBGC, ENOTSUP_NULL, tls_cipher_suite::fixed_iv_len, tls_connection::key, tls_cipher_suite::key_len, tls_cipher_suite::mac_len, memswap(), tls_endpoint::name, pending, tls_cipherspec_pair::pending, rc, strerror(), tls_application, tls_cipher_name(), tls_cipher_suite_null, tls_clear_cipher(), tls_pipe_name(), tlskey_cipher(), tlskey_traffic(), and tls_cipherspec_pair::writer.
Referenced by tls_new_change_cipher(), and tls_tx_step().
|
static |
Find TLS signature and hash algorithm.
| pubkey | Public-key algorithm |
| digest | Digest algorithm |
| sig_hash | Signature and hash algorithm, or NULL |
Definition at line 761 of file tls.c.
References tls_signature_hash_algorithm::digest, for_each_table_entry, NULL, tls_signature_hash_algorithm::pubkey, and TLS_SIG_HASH_ALGORITHMS.
Referenced by tls_send_certificate_verify().
|
static |
Find TLS signature and hash algorithm.
| code | Signature and hash algorithm identifier |
| sig_hash | Signature and hash algorithm, or NULL |
Definition at line 783 of file tls.c.
References code, tls_signature_hash_algorithm::code, for_each_table_entry, NULL, and TLS_SIG_HASH_ALGORITHMS.
Referenced by tls_new_server_key_exchange().
|
static |
Identify named key exchange group.
| named_group | Named group specification |
| group | Named group, or NULL |
Definition at line 809 of file tls.c.
References for_each_table_entry, group, NULL, and TLS_NAMED_GROUPS.
Referenced by tls_parse_ecdhe().
|
static |
Identify named key exchange group by Diffie-Hellman parameters.
| dh_p | Prime modulus |
| dh_p_len | Length of prime modulus |
| dh_g | Generator |
| dh_g_len | Length of generator |
| group | Named group, or NULL |
Definition at line 831 of file tls.c.
References ffdhe_has_params(), for_each_table_entry, group, is_ffdhe(), NULL, and TLS_NAMED_GROUPS.
Referenced by tls_parse_dhe().
|
static |
Parse key exchange parameters from unexpected Server Key Exchange record.
| data | Server Key Exchange handshake record |
| len | Length of Server Key Exchange handshake record |
| params | Key exchange parameters to fill in |
| rc | Return status code |
Definition at line 856 of file tls.c.
References __unused, data, DBGC, DBGC_HDA, EINVAL_KEY_EXCHANGE, and len.
|
static |
Parse key exchange parameters from DHE Server Key Exchange record.
| tls | TLS connection |
| data | Server Key Exchange handshake record |
| len | Length of Server Key Exchange handshake record |
| params | Key exchange parameters to fill in |
| rc | Return status code |
Definition at line 889 of file tls.c.
References __attribute__, data, DBGC, DBGC_HDA, EINVAL_KEY_EXCHANGE, ENOTSUP_GROUP, tls_key_exchange_parameters::exchange, group, len, tls_key_exchange_parameters::len, ntohs, param, tls_key_exchange_parameters::partner, tls_key_exchange_parameters::partner_len, tls_find_param_group(), and typeof().
|
static |
Parse key exchange parameters from ECDHE Server Key Exchange record.
| tls | TLS connection |
| data | Server Key Exchange handshake record |
| len | Length of Server Key Exchange handshake record |
| params | Key exchange parameters to fill in |
| rc | Return status code |
Definition at line 960 of file tls.c.
References __attribute__, data, DBGC, DBGC_HDA, EINVAL_KEY_EXCHANGE, ENOTSUP_GROUP, tls_key_exchange_parameters::exchange, group, len, tls_key_exchange_parameters::len, ntohs, tls_key_exchange_parameters::partner, tls_key_exchange_parameters::partner_len, tls_find_named_group(), and TLS_NAMED_CURVE_TYPE.
|
static |
Check if key exchange keys have a variable size.
| tls | TLS connection |
| exchange | Key exchange algorithm |
| is_variable | Key exchange keys have a variable size |
TLS versions 1.2 and earlier treat FFDHE public and shared keys as unsigned big-endian integers using a minimal byte representation. For all other purposes, key exchange keys have a fixed size determined by the key exchange algorithm.
Definition at line 1022 of file tls.c.
References tls_key_exchange_algorithm::exchange, is_ffdhe(), tls_version(), and TLS_VERSION_TLS_1_3.
Referenced by tls_channel_apply(), and tls_key_agree().
|
static |
Share public key.
| tls | TLS connection |
| exchange | Key exchange algorithm |
| public | Public key to fill in |
| len | Length of public key |
| rc | Return status code |
Definition at line 1049 of file tls.c.
References channel, tls_connection::channel, channel_key_share(), DBGC, EINVAL_KEY_EXCHANGE, len, exchange_algorithm::name, exchange_algorithm::pubsize, rc, and strerror().
Referenced by tls_key_build().
|
static |
Agree shared secret.
| tls | TLS connection |
| exchange | Key exchange algorithm |
| partner | Partner public key |
| len | Length of partner public key |
| rc | Return status code |
Definition at line 1082 of file tls.c.
References channel, tls_connection::channel, channel_key_agree(), DBGC, DBGC_HDA, EINVAL_KEY_EXCHANGE, ENOMEM, len, memcpy(), exchange_algorithm::name, partner, exchange_algorithm::pubsize, rc, strerror(), tls_keysize_is_variable(), tmp, zalloc(), and zfree().
Referenced by tls_new_server_key_exchange().
|
static |
Encrypt (and implicitly bind) shared secret.
| tls | TLS connection |
| exchange | Key exchange algorithm |
| builder | ASN.1 builder |
| rc | Return status code |
Definition at line 1143 of file tls.c.
References x509_public_key::algorithm, tls_server::chain, channel, tls_connection::channel, channel_bind_encrypt(), DBGC, ENOENT_CERT, exchange_algorithm::name, asn1_algorithm::pubkey, x509_subject::public_key, rc, tls_connection::server, strerror(), x509_certificate::subject, and x509_first().
Referenced by tls_key_build().
|
static |
Build shareable key.
| tls | TLS connection |
| exchange | Key exchange algorithm |
| builder | ASN.1 builder |
| rc | Return status code |
Definition at line 1182 of file tls.c.
References asn1_grow(), asn1_builder::data, exchange_algorithm::pubsize, rc, tls_key_encrypt(), and tls_key_share().
Referenced by tls_send_client_key_exchange().
|
static |
Reset the key schedule.
| channel | Secure channel |
Definition at line 1225 of file tls.c.
References channel, container_of, tls_connection::key, and tlskey_reset().
|
static |
Apply a new shared secret to key schedule.
| channel | Secure channel |
| exchange | Key exchange algorithm |
| shared | New shared secret |
| accumulated | Accumulation flag to fill in |
| rc | Return status code |
Definition at line 1242 of file tls.c.
References assert, channel, container_of, DBGC, DBGC_HDA, tls_connection::exchange, tls_connection::key, rc, exchange_algorithm::sharedsize, strerror(), tls_keysize_is_variable(), tlskey_apply(), and tlskey_is_accumulating().
|
static |
Save a pre-shared key for future resumption of the key schedule.
| channel | Secure channel |
| psid | Pre-shared bound peer identity |
| rc | Return status code |
Definition at line 1287 of file tls.c.
References channel, channel_is_established(), container_of, DBGC, EPERM_SAVE, tls_connection::key, NULL, tls_session::psid, tls_session::psk, rc, strerror(), and tlskey_save().
|
static |
Load a pre-shared key and resume the key schedule.
| channel | Secure channel |
| psid | Pre-shared bound peer identity |
| rc | Return status code |
Definition at line 1324 of file tls.c.
References channel, container_of, DBGC, tls_connection::extended_master_secret, tls_connection::key, tls_session::psid, tls_session::psk, rc, strerror(), and tlskey_load().
|
static |
Verify authenticator value.
| rc | Return status code |
Definition at line 1351 of file tls.c.
References channel, container_of, DBGC, DBGC_HDA, EPERM_VERIFY, tls_connection::key, len, memcmp(), rc, tls_verify_data::server, strerror(), tlskey_verify(), and tls_connection::verify.
|
static |
Find or create session for TLS connection.
| tls | TLS connection |
| name | Server name |
| rc | Return status code |
Definition at line 1405 of file tls.c.
References tls_connection::channel, channel_ephemeral_label(), tls_connection::client, tls_session::conn, tls_session_id::data, DBGC, ENOMEM, free_tls_session(), tls_session::id, INIT_LIST_HEAD, tls_client::key, tls_session::key, tls_session_id::len, tls_session::list, list_add, list_for_each_entry, name, tls_session::name, privkey_get(), rc, ref_get, ref_init, ref_put, tls_session::refcnt, tls_server::root, tls_session::root, tls_connection::server, tls_connection::session, strcmp(), strcpy(), strlen(), x509_root_get(), and zalloc().
|
static |
Save session for future resumption.
| tls | TLS connection |
| rc | Return status code |
Definition at line 1461 of file tls.c.
References tls_connection::channel, channel_save(), tls_session_id::data, tls_session_ticket::data, DBGC, DBGC_HDA, tls_session::id, tls_session_id::len, tls_session_ticket::len, memcpy(), tls_connection::new_id, tls_connection::new_ticket, NULL, tls_session::psid, rc, tls_connection::session, strerror(), tls_session::ticket, and zfree().
Referenced by tls_establish().
|
static |
Resume session.
| tls | TLS connection |
| rc | Return status code |
Definition at line 1497 of file tls.c.
References tls_connection::channel, channel_load(), tls_session_id::data, DBGC, DBGC_HDA, tls_session::id, tls_session_id::len, tls_session::psid, rc, tls_connection::session, and strerror().
Referenced by tls_new_server_hello().
|
static |
Add handshake record to verification hash.
| rc | Return status code |
Definition at line 1529 of file tls.c.
References data, tls_connection::key, len, and tlskey_digest().
Referenced by tls_new_handshake(), tls_new_server_hello(), and tls_send_record().
|
static |
Resume TX state machine.
| tls | TLS connection |
Definition at line 1543 of file tls.c.
References tls_tx::process, process_add(), and tls_connection::tx.
Referenced by tls_new_finished(), tls_restart(), tls_tx_resume_all(), tls_tx_step(), and tls_validator_done().
|
static |
Restart negotiation.
| tls | TLS connection |
Definition at line 1564 of file tls.c.
References assert, tls_connection::channel, channel_reopen(), tls_connection::client, is_pending(), tls_client::negotiation, tls_server::negotiation, tls_tx::pending, pending_get(), tls_connection::server, TLS_TX_CLIENT_HELLO, tls_tx_resume(), tls_connection::tx, and tls_server::validation.
Referenced by add_tls(), and tls_new_hello_request().
|
static |
Establish secure channel.
| tls | TLS connection |
| rc | Return status code |
Definition at line 1588 of file tls.c.
References tls_connection::channel, channel_establish(), tls_session::conn, DBGC, tls_session_id::len, tls_session_ticket::len, tls_connection::list, list_add_tail, list_del, tls_session::name, tls_connection::new_id, tls_connection::new_ticket, tls_connection::plainstream, rc, tls_server::root, tls_connection::server, tls_connection::session, strerror(), tls_save(), tls_tx_resume_all(), and xfer_window_changed().
Referenced by tls_new_finished(), and tls_send_finished().
|
static |
Transmit Handshake record.
| rc | Return status code |
Definition at line 1625 of file tls.c.
References data, len, tls_send_plaintext(), and TLS_TYPE_HANDSHAKE.
Referenced by tls_send_certificate_verify(), tls_send_client_hello(), tls_send_client_key_exchange(), and tls_send_finished().
|
static |
Digest or transmit Client Hello record.
| tls | TLS connection |
| action | Action to take on Client Hello record |
| rc | Return status code |
Definition at line 1639 of file tls.c.
References __attribute__, assert, tls_verify_data::client, code, tls_cipher_suite::code, tls_signature_hash_algorithm::code, cpu_to_le32, data, tls_session_id::data, tls_session_ticket::data, for_each_table_entry, group, hello, htonl, htons, tls_session::id, len, tls_session_id::len, tls_session_ticket::len, tls_session::list, max, memcpy(), memset(), name, tls_session::name, random(), tls_connection::secure_renegotiation, tls_connection::session, strlen(), tls_session::ticket, TLS_CIPHER_SUITES, TLS_CLIENT_HELLO, TLS_EXTENDED_MASTER_SECRET, TLS_MAX_FRAGMENT_LENGTH, TLS_MAX_FRAGMENT_LENGTH_VALUE, TLS_NAMED_GROUP, TLS_NAMED_GROUPS, tls_nonce(), TLS_NUM_CIPHER_SUITES, TLS_NUM_NAMED_GROUPS, TLS_NUM_SIG_HASH_ALGORITHMS, TLS_RENEGOTIATION_INFO, TLS_SERVER_NAME, TLS_SERVER_NAME_HOST_NAME, TLS_SESSION_TICKET, TLS_SIG_HASH_ALGORITHMS, TLS_SIGNATURE_ALGORITHMS, TLS_VERSION_MAX, type, typeof(), tls_connection::verify, and version.
Referenced by tls_new_server_hello(), and tls_send_client_hello().
|
static |
Transmit Client Hello record.
| tls | TLS connection |
| rc | Return status code |
Definition at line 1822 of file tls.c.
References tls_client_hello(), and tls_send_handshake().
Referenced by tls_tx_step().
|
static |
Transmit Certificate record.
| tls | TLS connection |
| rc | Return status code |
Definition at line 1833 of file tls.c.
References __attribute__, tls_client::chain, tls_connection::client, cpu_to_le32, asn1_cursor::data, data, DBGC, ENOENT_CERT, ENOMEM_CERTIFICATE, htonl, iob_disown, iob_put, asn1_cursor::len, len, length, link, x509_chain::links, io_buffer::list, list_for_each_entry, memcpy(), x509_certificate::raw, tls_alloc_iob(), TLS_CERTIFICATE, tls_send_record(), tls_set_uint24(), TLS_TYPE_HANDSHAKE, typeof(), and x509_name().
Referenced by tls_tx_step().
|
static |
Transmit Client Key Exchange record.
| tls | TLS connection |
| rc | Return status code |
Definition at line 1896 of file tls.c.
References __attribute__, asn1_prepend_raw(), assert, tls_tx::cipherspec, cpu_to_le32, asn1_builder::data, DBGC, ENOENT_KEY_EXCHANGE, tls_cipher_suite::exchange, tls_connection::exchange, tls_connection::extended_master_secret, free, htonl, key, tls_connection::key, asn1_builder::len, len, tls_key_exchange_algorithm::len_len, NULL, tls_cipherspec_pair::pending, rc, strerror(), tls_cipherspec::suite, TLS_CLIENT_KEY_EXCHANGE, tls_key_build(), tls_send_handshake(), tlskey_master(), and tls_connection::tx.
Referenced by tls_tx_step().
|
static |
Transmit Certificate Verify record.
| tls | TLS connection |
| rc | Return status code |
Definition at line 1970 of file tls.c.
References __attribute__, asn1_prepend_raw(), tls_client::chain, tls_connection::client, tls_signature_hash_algorithm::code, cpu_to_le32, asn1_builder::data, DBGC, tls_key_schedule::digest, digest_algorithm::digestsize, digestsize, ENOENT_CERT, ENOTSUP_SIG_HASH, header, htonl, htons, key, tls_client::key, tls_connection::key, asn1_builder::len, memcpy(), digest_algorithm::name, pubkey_algorithm::name, NULL, privkey_cursor(), asn1_algorithm::pubkey, pubkey_sign(), rc, x509_certificate::signature_algorithm, strerror(), TLS_CERTIFICATE_VERIFY, tls_send_handshake(), tls_signature_hash_algorithm(), tls_version(), TLS_VERSION_TLS_1_2, tlskey_tbshash(), x509_first(), and zfree().
Referenced by tls_tx_step().
|
static |
Transmit Change Cipher record.
| tls | TLS connection |
| rc | Return status code |
Definition at line 2074 of file tls.c.
References __attribute__, spec, TLS_CHANGE_CIPHER_SPEC, tls_send_plaintext(), and TLS_TYPE_CHANGE_CIPHER.
Referenced by tls_tx_step().
|
static |
Transmit Finished record.
| tls | TLS connection |
| rc | Return status code |
Definition at line 2091 of file tls.c.
References __attribute__, tls_connection::client, tls_verify_data::client, cpu_to_le32, DBGC, htonl, is_pending(), tls_connection::key, memcpy(), memset(), tls_client::negotiation, tls_server::negotiation, pending_put(), rc, tls_connection::server, strerror(), tls_establish(), TLS_FINISHED, tls_send_handshake(), tlskey_verify(), and tls_connection::verify.
Referenced by tls_tx_step().
|
static |
Receive new Change Cipher record.
| tls | TLS connection |
| iobuf | I/O buffer |
| rc | Return status code |
Definition at line 2162 of file tls.c.
References __attribute__, tls_connection::channel, tls_rx::cipherspec, io_buffer::data, DBGC, DBGC_HD, EINVAL_CHANGE_CIPHER, iob_len(), iob_pull, len, rc, secure_channel::rx, tls_connection::rx, tls_rx::seq, spec, strerror(), tls_change_cipher(), and TLS_CHANGE_CIPHER_SPEC.
Referenced by tls_new_record().
|
static |
Receive new Alert record.
| tls | TLS connection |
| iobuf | I/O buffer |
| rc | Return status code |
Definition at line 2198 of file tls.c.
References __attribute__, alert(), io_buffer::data, DBGC, DBGC_HD, EINVAL_ALERT, EIO_ALERT, EPERM_ALERT, iob_len(), iob_pull, len, next, TLS_ALERT_CLOSE_NOTIFY, TLS_ALERT_FATAL, TLS_ALERT_WARNING, and tls_close().
Referenced by tls_new_record().
|
static |
Receive new Hello Request handshake record.
| rc | Return status code |
Definition at line 2248 of file tls.c.
References __unused, data, DBGC, EPERM_RENEG_INSECURE, tls_connection::extended_master_secret, len, tls_connection::secure_renegotiation, tls_ready(), and tls_restart().
Referenced by tls_new_handshake().
|
static |
Receive new Server Hello handshake record.
| rc | Return status code |
Definition at line 2279 of file tls.c.
References __attribute__, data, tls_session_id::data, DBGC, DBGC_HD, DBGC_HDA, EINVAL_HELLO, ENOTSUP_VERSION, EPERM_RENEG_VERIFY, EPROTO_VERSION, ext, tls_connection::extended_master_secret, htons, tls_session::id, len, tls_session_id::len, memcmp(), memcpy(), tls_connection::new_id, next, ntohs, NULL, random(), rc, tls_connection::secure_renegotiation, tls_connection::session, tls_add_handshake(), tls_client_hello(), TLS_EXTENDED_MASTER_SECRET, TLS_RENEGOTIATION_INFO, tls_resume(), tls_select_cipher(), TLS_VERSION_MIN, type, tls_connection::verify, tls_connection::version, and version.
Referenced by tls_new_handshake().
|
static |
Receive New Session Ticket handshake record.
| rc | Return status code |
Definition at line 2471 of file tls.c.
References __attribute__, data, tls_session_ticket::data, DBGC, DBGC_HD, DBGC_HDA, EINVAL_TICKET, ENOMEM, len, tls_session_ticket::len, lifetime, malloc(), memcpy(), tls_connection::new_ticket, ntohs, NULL, and zfree().
Referenced by tls_new_handshake().
|
static |
Parse certificate chain.
| rc | Return status code |
Definition at line 2521 of file tls.c.
References __attribute__, tls_server::chain, data, DBGC, DBGC_HDA, EINVAL_CERTIFICATE, ENOMEM_CHAIN, len, length, NULL, rc, tls_connection::server, strerror(), tls_uint24(), x509_alloc_chain(), x509_append_raw(), x509_chain_put(), x509_last(), and x509_name().
Referenced by tls_new_certificate().
|
static |
Receive new Certificate handshake record.
| rc | Return status code |
Definition at line 2600 of file tls.c.
References __attribute__, data, DBGC, DBGC_HD, EINVAL_CERTIFICATES, len, length, rc, tls_parse_chain(), and tls_uint24().
Referenced by tls_new_handshake().
|
static |
Receive new Server Key Exchange handshake record.
| rc | Return status code |
Definition at line 2640 of file tls.c.
References __attribute__, tls_signature_hash_algorithm::algorithm, x509_public_key::algorithm, assert, tls_server::chain, tls_connection::channel, channel_bind_verify(), tls_tx::cipherspec, data, DBGC, DBGC_HDA, tls_signature_hash_algorithm::digest, digest_algorithm::digestsize, EINVAL_KEY_EXCHANGE, ENOENT_CERT, ENOTSUP_SIG_HASH, EPERM_KEY_EXCHANGE, tls_cipher_suite::exchange, tls_connection::exchange, tls_key_exchange_parameters::exchange, tls_connection::key, len, tls_key_exchange_parameters::len, md5_sha1_algorithm, asn1_algorithm::name, digest_algorithm::name, exchange_algorithm::name, pubkey_algorithm::name, tls_key_exchange_algorithm::name, ntohs, tls_key_exchange_algorithm::parse, tls_key_exchange_parameters::partner, tls_key_exchange_parameters::partner_len, tls_cipherspec_pair::pending, tls_cipher_suite::pubkey, tls_signature_hash_algorithm::pubkey, x509_subject::public_key, rc, tls_connection::server, sig, signature, strerror(), x509_certificate::subject, tls_cipherspec::suite, tls_find_signature_hash(), tls_key_agree(), tls_version(), TLS_VERSION_TLS_1_2, tlskey_tbshash(), tls_connection::tx, and x509_first().
Referenced by tls_new_handshake().
|
static |
Receive new Certificate Request handshake record.
| rc | Return status code |
Definition at line 2761 of file tls.c.
References __unused, certstore, tls_client::chain, tls_connection::client, data, DBGC, ENOMEM, tls_client::key, len, NULL, rc, x509_alloc_chain(), x509_append(), x509_auto_append(), x509_chain_put(), x509_find_key(), and x509_name().
Referenced by tls_new_handshake().
|
static |
Receive new Server Hello Done handshake record.
| rc | Return status code |
Definition at line 2821 of file tls.c.
References __attribute__, tls_server::chain, create_validator(), data, DBGC, DBGC_HD, EINVAL_HELLO_DONE, is_pending(), len, next, pending_get(), rc, tls_server::root, tls_connection::server, strerror(), tls_server::validation, and tls_server::validator.
Referenced by tls_new_handshake().
|
static |
Receive new Finished handshake record.
| rc | Return status code |
Definition at line 2862 of file tls.c.
References tls_connection::channel, channel_confirm(), tls_connection::client, data, DBGC, is_pending(), len, tls_client::negotiation, tls_server::negotiation, tls_tx::pending, pending_put(), rc, tls_connection::server, strerror(), tls_establish(), TLS_TX_CHANGE_CIPHER, TLS_TX_FINISHED, tls_tx_resume(), and tls_connection::tx.
Referenced by tls_new_handshake().
|
static |
Receive new Handshake record.
| tls | TLS connection |
| iobuf | I/O buffer |
| rc | Return status code |
Following the general robustness principle, we accept handshake records in any order of arrival and rely on the secure channel abstraction to determine whether or not the resulting sequence of operations is sufficient to establish the channel.
Most non-standard handshake record sequences would not manage to successfully establish the channel. For example: a premature Finished that attempts to skip the ServerKeyExchange would fail because the channel will reject an attempt to confirm an unbound peer identity.
It would be possible for an inventive server to construct non-standard sequences of handshake records that do successfully establish the secure channel. For example: a server could choose to send a second ServerKeyExchange record with a second valid signature (over the updated transcript digest that includes the first ServerKeyExchange). This would be non-standard and rather pointless, but would be accepted for the purpose of establishing the secure channel since it does in fact provide the required security properties.
Definition at line 2922 of file tls.c.
References __attribute__, io_buffer::data, DBGC, iob_len(), iob_pull, length, rc, tls_add_handshake(), TLS_CERTIFICATE, TLS_CERTIFICATE_REQUEST, TLS_FINISHED, TLS_HELLO_REQUEST, tls_new_certificate(), tls_new_certificate_request(), tls_new_finished(), tls_new_hello_request(), tls_new_server_hello(), tls_new_server_hello_done(), tls_new_server_key_exchange(), TLS_NEW_SESSION_TICKET, tls_new_session_ticket(), TLS_SERVER_HELLO, TLS_SERVER_HELLO_DONE, TLS_SERVER_KEY_EXCHANGE, tls_uint24(), and type.
Referenced by tls_new_record().
|
static |
Receive new unknown record.
| tls | TLS connection |
| iobuf | I/O buffer |
| rc | Return status code |
Definition at line 3012 of file tls.c.
References __unused, iob_len(), and iob_pull.
Referenced by tls_new_record().
|
static |
Receive new data record.
| tls | TLS connection |
| rx_data | List of received data buffers |
| rc | Return status code |
Definition at line 3027 of file tls.c.
References DBGC, ENOTCONN, io_buffer::list, list_del, list_first_entry, tls_connection::plainstream, rc, strerror(), tls_ready(), and xfer_deliver_iob().
Referenced by tls_new_record().
|
static |
Receive new record.
| tls | TLS connection |
| type | Record type |
| rx_data | List of received data buffers |
| rc | Return status code |
Definition at line 3059 of file tls.c.
References assert, DBGC, ENOMEM_RX_CONCAT, free_iob(), tls_rx::handshake, iob_concatenate(), iob_len(), list_add, NULL, rc, tls_connection::rx, tls_new_alert(), tls_new_change_cipher(), tls_new_data(), tls_new_handshake(), tls_new_unknown(), TLS_TYPE_ALERT, TLS_TYPE_CHANGE_CIPHER, TLS_TYPE_DATA, TLS_TYPE_HANDSHAKE, tmp, and type.
Referenced by tls_new_ciphertext().
|
static |
Initialise HMAC.
| cipherspec | Cipher specification |
| ctx | Context |
| authhdr | Authentication header |
Definition at line 3137 of file tls.c.
References ctx, tls_cipher_suite::digest, hmac_init(), hmac_update(), tls_cipher_suite::mac_len, tls_cipherspec::mac_secret, and tls_cipherspec::suite.
Referenced by tls_hmac(), and tls_hmac_list().
|
static |
Update HMAC.
Definition at line 3154 of file tls.c.
References ctx, data, tls_cipher_suite::digest, hmac_update(), len, and tls_cipherspec::suite.
Referenced by tls_hmac(), and tls_hmac_list().
|
static |
Finalise HMAC.
Definition at line 3168 of file tls.c.
References ctx, tls_cipher_suite::digest, hmac_final(), and tls_cipherspec::suite.
Referenced by tls_hmac(), and tls_hmac_list().
|
static |
Calculate HMAC.
| cipherspec | Cipher specification |
| authhdr | Authentication header |
| data | Data |
| len | Length of data |
| mac | HMAC to fill in |
Definition at line 3184 of file tls.c.
References ctx, data, tls_cipher_suite::digest, hmac_ctxsize(), len, tls_cipherspec::suite, tls_hmac_final(), tls_hmac_init(), and tls_hmac_update().
Referenced by tls_send_record().
|
static |
Calculate HMAC over list of I/O buffers.
| cipherspec | Cipher specification |
| authhdr | Authentication header |
| list | List of I/O buffers |
| mac | HMAC to fill in |
Definition at line 3203 of file tls.c.
References ctx, io_buffer::data, tls_cipher_suite::digest, hmac_ctxsize(), iob_len(), io_buffer::list, list_for_each_entry, tls_cipherspec::suite, tls_hmac_final(), tls_hmac_init(), and tls_hmac_update().
Referenced by tls_new_ciphertext().
|
static |
Calculate maximum additional length required for transmitted record(s).
| tls | TLS connection |
| len | I/O buffer payload length |
| reserve | Maximum additional length to reserve |
Definition at line 3225 of file tls.c.
References tls_cipherspec_pair::active, cipher_algorithm::authsize, cipher_algorithm::blocksize, tls_connection::channel, secure_pipe::cipher, tls_tx::cipherspec, count, is_block_cipher(), len, tls_cipher_suite::mac_len, tls_cipher_suite::record_iv_len, tls_cipherspec::suite, TLS_TX_BUFSIZE, secure_channel::tx, and tls_connection::tx.
Referenced by tls_alloc_iob(), and tls_send_record().
|
static |
Verify block padding.
| tls | TLS connection |
| iobuf | Last received I/O buffer |
Definition at line 3458 of file tls.c.
References io_buffer::data, DBGC, DBGC_HD, EINVAL_PADDING, iob_len(), len, pad, and io_buffer::tail.
Referenced by tls_new_ciphertext().
|
static |
Receive new ciphertext record.
| tls | TLS connection |
| tlshdr | Record header |
| rx_data | List of received data buffers |
| rc | Return status code |
Definition at line 3493 of file tls.c.
References __attribute__, tls_cipherspec_pair::active, assert, cipher_algorithm::authsize, tls_connection::channel, secure_pipe::cipher, tls_cipher_suite::cipher, cipher_auth(), cipher_decrypt, cipher_setiv(), tls_rx::cipherspec, cpu_to_be64, secure_pipe::ctx, io_buffer::data, tls_rx::data, DBGC, DBGC2, DBGC2_HD, DBGC_HD, tls_cipher_suite::digest, digest_algorithm::digestsize, EINVAL_IV, EINVAL_MAC, first, fixed, tls_cipherspec::fixed_iv, tls_cipher_suite::fixed_iv_len, tls_auth_header::header, htons, iob_len(), iob_pull, iob_unput, is_auth_cipher(), is_block_cipher(), iv, len, tls_header::length, io_buffer::list, list_empty, list_first_entry, list_for_each_entry, list_last_entry, mac, tls_cipher_suite::mac_len, memcmp(), memcpy(), ntohs, NULL, rc, tls_cipher_suite::record_iv_len, secure_channel::rx, tls_connection::rx, tls_auth_header::seq, tls_rx::seq, strerror(), tls_cipherspec::suite, io_buffer::tail, tls_hmac_list(), tls_new_record(), tls_verify_padding(), tls_header::type, and tls_header::version.
Referenced by tls_newdata_process_data().
|
static |
Check flow control window.
| tls | TLS connection |
| len | Length of window |
Definition at line 3648 of file tls.c.
References tls_connection::cipherstream, tls_ready(), and xfer_window().
|
static |
Deliver datagram as raw data.
| tls | TLS connection |
| iobuf | I/O buffer |
| meta | Data transfer metadata |
| rc | Return status code |
Definition at line 3665 of file tls.c.
References __unused, done, ENOTCONN, free_iob(), iob_disown, meta, rc, tls_ready(), tls_send_record(), and TLS_TYPE_DATA.
|
static |
Report job progress.
| tls | TLS connection |
| progress | Progress report to fill in |
| ongoing_rc | Ongoing job status code (if known) |
Definition at line 3693 of file tls.c.
References tls_connection::cipherstream, is_pending(), job_progress(), tls_connection::server, tls_server::validation, and tls_server::validator.
|
static |
Handle received TLS header.
| tls | TLS connection |
| rc | Returned status code |
Definition at line 3733 of file tls.c.
References tls_cipherspec_pair::active, cipher_algorithm::alignsize, alloc_iob_raw(), assert, tls_connection::channel, secure_pipe::cipher, tls_rx::cipherspec, tls_rx::data, data_len, DBGC, ENOMEM_RX_DATA, free_iob(), tls_rx::header, iob_reserve, iob_tailroom(), tls_header::length, io_buffer::list, list_add_tail, list_del, list_empty, list_for_each_entry_safe, ntohs, rc, tls_cipher_suite::record_iv_len, secure_channel::rx, tls_connection::rx, tls_rx::state, tls_cipherspec::suite, TLS_RX_ALIGN, TLS_RX_BUFSIZE, TLS_RX_DATA, TLS_RX_MIN_BUFSIZE, and tmp.
Referenced by tls_cipherstream_deliver().
|
static |
Handle received TLS data payload.
| tls | TLS connection |
| rc | Returned status code |
Definition at line 3819 of file tls.c.
References assert, tls_rx::data, tls_rx::header, iob_tailroom(), iob_unput, tls_rx::iobuf, io_buffer::list, list_add_tail, list_del, list_empty, list_first_entry, rc, tls_connection::rx, tls_rx::seq, tls_rx::state, tls_new_ciphertext(), and TLS_RX_HEADER.
Referenced by tls_cipherstream_deliver().
|
static |
Check flow control window.
| tls | TLS connection |
| len | Length of window |
Definition at line 3855 of file tls.c.
References tls_connection::plainstream, tls_ready(), and xfer_window().
|
static |
Receive new ciphertext.
| tls | TLS connection |
| iobuf | I/O buffer |
| meta | Data transfer metadat |
| rc | Return status code |
Definition at line 3872 of file tls.c.
References __unused, assert, io_buffer::data, tls_rx::data, dest, done, EINVAL_RX_STATE, free_iob(), iob_len(), iob_pull, iob_put, iob_tailroom(), tls_rx::iobuf, io_buffer::list, list_first_entry, memcpy(), NULL, rc, tls_connection::rx, tls_rx::state, tls_close_alert(), tls_newdata_process_data(), tls_newdata_process_header(), TLS_RX_DATA, and TLS_RX_HEADER.
|
static |
Handle certificate validation completion.
| tls | TLS connection |
| rc | Reason for completion |
Definition at line 3951 of file tls.c.
References tls_client::chain, tls_connection::client, DBGC, intf_restart(), x509_chain::links, list_empty, tls_tx::pending, pending_put(), rc, tls_connection::server, strerror(), tls_close_alert(), TLS_TX_CERTIFICATE, TLS_TX_CERTIFICATE_VERIFY, TLS_TX_CHANGE_CIPHER, TLS_TX_CLIENT_KEY_EXCHANGE, TLS_TX_FINISHED, tls_tx_resume(), tls_connection::tx, tls_server::validation, and tls_server::validator.
|
static |
TLS TX state machine.
| tls | TLS connection |
Definition at line 4007 of file tls.c.
References tls_connection::channel, tls_tx::cipherspec, tls_connection::cipherstream, tls_session::conn, DBGC, is_pending(), tls_connection::list, list_for_each_entry, tls_server::negotiation, tls_tx::pending, tls_connection::plainstream, rc, tls_tx::seq, tls_connection::server, tls_connection::session, strerror(), tls_change_cipher(), tls_close_alert(), tls_send_certificate(), tls_send_certificate_verify(), tls_send_change_cipher(), tls_send_client_hello(), tls_send_client_key_exchange(), tls_send_finished(), TLS_TX_CERTIFICATE, TLS_TX_CERTIFICATE_VERIFY, TLS_TX_CHANGE_CIPHER, TLS_TX_CLIENT_HELLO, TLS_TX_CLIENT_KEY_EXCHANGE, TLS_TX_FINISHED, tls_tx_resume(), secure_channel::tx, tls_connection::tx, xfer_window(), and xfer_window_changed().
| int add_tls | ( | struct interface * | xfer, |
| const char * | name, | ||
| struct x509_root * | root, | ||
| struct private_key * | key ) |
Add TLS on an interface.
| xfer | Data transfer interface |
| name | Host name |
| root | Root of trust (or NULL to use default) |
| key | Private key (or NULL to use default) |
| rc | Return status code |
Definition at line 4119 of file tls.c.
References tls_cipherspec_pair::active, tls_connection::channel, channel_close(), channel_init(), channel_open(), tls_rx::cipherspec, tls_tx::cipherspec, tls_connection::cipherstream, tls_connection::client, tls_session::conn, tls_rx::data, ENOMEM, tls_connection::exchange, exchange_null, free_tls(), tls_rx::header, INIT_LIST_HEAD, intf_init(), intf_insert(), iob_populate(), tls_rx::iobuf, key, tls_client::key, tls_connection::list, list_add_tail, malloc(), memset(), name, tls_cipherspec_pair::pending, tls_connection::plainstream, privkey_get(), tls_tx::process, process_init_stopped(), rc, ref_init, ref_put, tls_connection::refcnt, root, tls_server::root, root_certificates, tls_connection::rx, tls_connection::server, tls_connection::session, tls_channel_ops, tls_cipherstream_desc, tls_clear_cipher(), tls_clear_digest(), tls_plainstream_desc, tls_process_desc, tls_restart(), tls_validator_desc, TLS_VERSION_MAX, tls_connection::tx, tls_server::validator, tls_connection::version, tls_cipherspec_pair::writer, and x509_root_get().
Referenced by apply_syslogs_settings(), https_filter(), ipair_rx_session(), and REQUIRING_SYMBOL().
| REQUIRE_OBJECT | ( | config_crypto | ) |
| struct tls_cipher_suite tls_cipher_suite_null |
Null cipher suite.
Definition at line 510 of file tls.c.
Referenced by tls_change_cipher(), and tls_clear_cipher().
| struct tls_key_exchange_algorithm tls_null_exchange_algorithm |
Null key exchange algorithm.
Definition at line 865 of file tls.c.
| struct tls_key_exchange_algorithm tls_pubkey_exchange_algorithm |
Public key exchange algorithm.
Definition at line 873 of file tls.c.
Referenced by __tls_cipher_suite(), __tls_cipher_suite(), __tls_cipher_suite(), __tls_cipher_suite(), __tls_cipher_suite(), __tls_cipher_suite(), and tls_cipher_name().
| struct tls_key_exchange_algorithm tls_dhe_exchange_algorithm |
Ephemeral Diffie-Hellman key exchange algorithm.
Definition at line 944 of file tls.c.
Referenced by __tls_cipher_suite(), __tls_cipher_suite(), __tls_cipher_suite(), __tls_cipher_suite(), __tls_cipher_suite(), and __tls_cipher_suite().
| struct tls_key_exchange_algorithm tls_ecdhe_exchange_algorithm |
Ephemeral Elliptic Curve Diffie-Hellman key exchange algorithm.
Definition at line 1003 of file tls.c.
Referenced by __tls_cipher_suite(), __tls_cipher_suite(), __tls_cipher_suite(), __tls_cipher_suite(), __tls_cipher_suite(), and __tls_cipher_suite().
|
static |
Secure channel operations.
Definition at line 1383 of file tls.c.
Referenced by add_tls().
|
static |
TLS plaintext stream interface operations.
|
static |
TLS plaintext stream interface descriptor.
Definition at line 3716 of file tls.c.
Referenced by add_tls().
|
static |
TLS ciphertext stream interface operations.
Definition at line 3923 of file tls.c.
|
static |
TLS ciphertext stream interface descriptor.
Definition at line 3934 of file tls.c.
Referenced by add_tls().
|
static |
TLS certificate validator interface operations.
|
static |
TLS certificate validator interface descriptor.
Definition at line 3991 of file tls.c.
Referenced by add_tls().
|
static |
TLS TX process descriptor.
Definition at line 4100 of file tls.c.
Referenced by add_tls().