|
libwebsockets
Lightweight C library for HTML5 websockets
|
Data Structures | |
| struct | lws_cc_ops |
Typedefs | |
| typedef int(* | lws_tls_quic_secret_cb) (struct lws *wsi, enum lws_tls_quic_secret_type type, const uint8_t *secret, size_t secret_len) |
Functions | |
| LWS_VISIBLE LWS_EXTERN int | lws_tls_quic_init (struct lws *wsi, lws_tls_quic_secret_cb cb) |
| LWS_VISIBLE LWS_EXTERN int | lws_tls_quic_advance_handshake (struct lws *wsi, int level, const uint8_t *in, size_t in_len, uint8_t *out, size_t *out_len) |
| LWS_VISIBLE LWS_EXTERN int | lws_tls_quic_set_transport_parameters (struct lws *wsi, const uint8_t *tp, size_t tp_len) |
| LWS_VISIBLE LWS_EXTERN int | lws_tls_quic_get_transport_parameters (struct lws *wsi, const uint8_t **tp, size_t *tp_len) |
| LWS_VISIBLE LWS_EXTERN enum lws_0rtt_status | lws_tls_0rtt_status (struct lws *wsi) |
| LWS_VISIBLE LWS_EXTERN int | lws_rx_is_early_data (struct lws *wsi) |
| LWS_VISIBLE LWS_EXTERN int | lws_tls_quic_api_test (void) |
| LWS_VISIBLE LWS_EXTERN int | lws_tls_quic_migrate_wsi (struct lws *old_wsi, struct lws *new_wsi) |
| LWS_VISIBLE LWS_EXTERN int | lws_quic_initiate_key_update (struct lws *wsi) |
Variables | |
| LWS_VISIBLE LWS_EXTERN_FOR_DATA const struct lws_cc_ops | lws_cc_ops_newreno |
| LWS_VISIBLE LWS_EXTERN_FOR_DATA const struct lws_cc_ops | lws_cc_ops_cubic |
These APIs abstract the underlying TLS library to provide the memory BIO and traffic secret extraction capabilities required for QUIC.
| typedef int(* lws_tls_quic_secret_cb) (struct lws *wsi, enum lws_tls_quic_secret_type type, const uint8_t *secret, size_t secret_len) |
#include <lws-quic.h>
lws_tls_quic_secret_cb() - Callback for QUIC traffic secret derivation
| wsi | the wsi |
| type | the type of secret derived |
| secret | the raw secret bytes |
| secret_len | length of the secret |
This callback is fired by the underlying TLS library (OpenSSL, mbedTLS, etc) when a new traffic secret is derived during the QUIC TLS 1.3 handshake.
Definition at line 59 of file lws-quic.h.
#include <lws-quic.h>
| Enumerator | |
|---|---|
| LWS_TLS_QUIC_SECRET_CLIENT_EARLY | |
| LWS_TLS_QUIC_SECRET_CLIENT_HANDSHAKE | |
| LWS_TLS_QUIC_SECRET_SERVER_HANDSHAKE | |
| LWS_TLS_QUIC_SECRET_CLIENT_APPLICATION | |
| LWS_TLS_QUIC_SECRET_SERVER_APPLICATION | |
Definition at line 33 of file lws-quic.h.
| enum lws_0rtt_status |
#include <lws-quic.h>
Definition at line 41 of file lws-quic.h.
| LWS_VISIBLE LWS_EXTERN int lws_tls_quic_init | ( | struct lws * | wsi, |
| lws_tls_quic_secret_cb | cb ) |
#include <lws-quic.h>
lws_tls_quic_init() - Initialize QUIC TLS state for a wsi
| wsi | the wsi |
| cb | the traffic secret callback |
Enables QUIC mode on the TLS connection.
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN int lws_tls_quic_advance_handshake | ( | struct lws * | wsi, |
| int | level, | ||
| const uint8_t * | in, | ||
| size_t | in_len, | ||
| uint8_t * | out, | ||
| size_t * | out_len ) |
#include <lws-quic.h>
lws_tls_quic_advance_handshake() - Feed QUIC CRYPTO frame data to TLS
| wsi | the wsi |
| in | incoming CRYPTO frame payload (or NULL) |
| in_len | length of incoming data |
| out | buffer for outgoing CRYPTO frame payload |
| out_len | on entry, max size of out; on exit, bytes written |
Feeds TLS handshake bytes into the memory BIO and retrieves the output to be sent in the next QUIC CRYPTO frame.
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN int lws_tls_quic_set_transport_parameters | ( | struct lws * | wsi, |
| const uint8_t * | tp, | ||
| size_t | tp_len ) |
#include <lws-quic.h>
lws_tls_quic_set_transport_parameters() - Set QUIC transport parameters extension
| wsi | the wsi |
| tp | the transport parameters payload |
| tp_len | length of the payload |
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN int lws_tls_quic_get_transport_parameters | ( | struct lws * | wsi, |
| const uint8_t ** | tp, | ||
| size_t * | tp_len ) |
#include <lws-quic.h>
lws_tls_quic_get_transport_parameters() - Get peer's QUIC transport parameters
| wsi | the wsi |
| tp | pointer to receive the transport parameters payload |
| tp_len | pointer to receive the length |
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN enum lws_0rtt_status lws_tls_0rtt_status | ( | struct lws * | wsi | ) |
#include <lws-quic.h>
lws_tls_0rtt_status() - Get the status of 0-RTT early data
| wsi | the wsi |
Returns the status of 0-RTT early data for the connection.
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN int lws_rx_is_early_data | ( | struct lws * | wsi | ) |
#include <lws-quic.h>
lws_rx_is_early_data() - Determine if received data is 0-RTT early data
| wsi | the wsi |
Returns 1 if the current RX data was received as 0-RTT early data, 0 otherwise.
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN int lws_tls_quic_api_test | ( | void | ) |
#include <lws-quic.h>
lws_tls_quic_api_test() - Internal API test for QUIC TLS 1.3 memory BIOs
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN int lws_tls_quic_migrate_wsi | ( | struct lws * | old_wsi, |
| struct lws * | new_wsi ) |
#include <lws-quic.h>
lws_tls_quic_migrate_wsi() - Migrate QUIC TLS context from old to new wsi
| old_wsi | the old logical stream wsi |
| new_wsi | the new parent network connection wsi |
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN int lws_quic_initiate_key_update | ( | struct lws * | wsi | ) |
#include <lws-quic.h>
lws_quic_initiate_key_update() - Manually trigger a QUIC Key Update
| wsi | any QUIC wsi on the connection (stream or network) |
Initiates a Key Update on the QUIC connection as per RFC 9001. Returns 0 if successfully initiated, or nonzero on failure.
| LWS_VISIBLE LWS_EXTERN_FOR_DATA const struct lws_cc_ops lws_cc_ops_newreno |
#include <lws-quic.h>
Definition at line 166 of file lws-quic.h.
| LWS_VISIBLE LWS_EXTERN_FOR_DATA const struct lws_cc_ops lws_cc_ops_cubic |
#include <lws-quic.h>
Definition at line 167 of file lws-quic.h.