|
libwebsockets
Lightweight C library for HTML5 websockets
|
#include <lws-tls-sessions.h>
Go to the source code of this file.
Data Structures | |
| struct | lws_tls_session_dump |
Macros | |
| #define | LWS_SESSION_TAG_LEN 96 |
Typedefs | |
| typedef int(* | lws_tls_sess_cb_t) (struct lws_context *cx, struct lws_tls_session_dump *info) |
Enumerations | |
| enum | { LWS_TLS_SESSION_DUMP_F_QUIC = (1 << 0) } |
Functions | |
| LWS_VISIBLE LWS_EXTERN int | lws_tls_session_dump_save_flags (struct lws_vhost *vh, const char *host, uint16_t port, unsigned int flags, lws_tls_sess_cb_t cb_save, void *opq) |
| LWS_VISIBLE LWS_EXTERN int | lws_tls_session_dump_load_flags (struct lws_vhost *vh, const char *host, uint16_t port, unsigned int flags, lws_tls_sess_cb_t cb_load, void *opq) |
| LWS_VISIBLE LWS_EXTERN int | lws_tls_session_dump_save (struct lws_vhost *vh, const char *host, uint16_t port, lws_tls_sess_cb_t cb_save, void *opq) |
| LWS_VISIBLE LWS_EXTERN int | lws_tls_session_dump_load (struct lws_vhost *vh, const char *host, uint16_t port, lws_tls_sess_cb_t cb_load, void *opq) |
| struct lws_tls_session_dump |
Definition at line 34 of file lws-tls-sessions.h.
| Data Fields | ||
|---|---|---|
| char | tag[LWS_SESSION_TAG_LEN] | |
| void * | blob | |
| void * | opaque | |
| size_t | blob_len | |
| #define LWS_SESSION_TAG_LEN 96 |
Definition at line 32 of file lws-tls-sessions.h.
| typedef int(* lws_tls_sess_cb_t) (struct lws_context *cx, struct lws_tls_session_dump *info) |
Definition at line 42 of file lws-tls-sessions.h.
| anonymous enum |
Definition at line 48 of file lws-tls-sessions.h.
| LWS_VISIBLE LWS_EXTERN int lws_tls_session_dump_save_flags | ( | struct lws_vhost * | vh, |
| const char * | host, | ||
| uint16_t | port, | ||
| unsigned int | flags, | ||
| lws_tls_sess_cb_t | cb_save, | ||
| void * | opq ) |
lws_tls_session_dump_save_flags() - serialize a tls session via a callback
| vh | the vhost whose client session cache to look in |
| host | the name of the host the session relates to |
| port | the port the session connects to on the host |
| flags | 0, or LWS_TLS_SESSION_DUMP_F_QUIC for the quic session |
| cb_save | the callback to perform the saving of the session blob |
| opq | an opaque pointer passed into the callback |
If a session matching the vhost/host/port and transport exists in the vhost's session cache, serialize it via the provided callback.
Only sessions of connections that fully validated the server are visible here: those of connections with relaxed cert checks are kept apart in the cache and never saved or loaded.
opq is passed to the callback without being used by lws at all.
Returns 0 if the session was found and the callback accepted it.
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN int lws_tls_session_dump_load_flags | ( | struct lws_vhost * | vh, |
| const char * | host, | ||
| uint16_t | port, | ||
| unsigned int | flags, | ||
| lws_tls_sess_cb_t | cb_load, | ||
| void * | opq ) |
lws_tls_session_dump_load_flags() - deserialize a tls session via a callback
| vh | the vhost whose client session cache to load into |
| host | the name of the host the session relates to |
| port | the port the session connects to on the host |
| flags | 0, or LWS_TLS_SESSION_DUMP_F_QUIC for a quic session |
| cb_load | the callback to retreive the session blob from |
| opq | an opaque pointer passed into the callback |
Try to preload a session described by the vhost / host / port and transport into the client session cache, from the given callback. It is only offered to connections over that transport that fully validate the server. With LWS_TLS_SESSION_DUMP_F_QUIC, a client that opts into it sends 0-RTT data under the loaded session, so it must only be given what lws_tls_session_dump_save_flags() saved with the same flag.
opq is passed to the callback without being used by lws at all.
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN int lws_tls_session_dump_save | ( | struct lws_vhost * | vh, |
| const char * | host, | ||
| uint16_t | port, | ||
| lws_tls_sess_cb_t | cb_save, | ||
| void * | opq ) |
lws_tls_session_dump_save() - serialize a tls over tcp session
As lws_tls_session_dump_save_flags() with flags 0
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN int lws_tls_session_dump_load | ( | struct lws_vhost * | vh, |
| const char * | host, | ||
| uint16_t | port, | ||
| lws_tls_sess_cb_t | cb_load, | ||
| void * | opq ) |
lws_tls_session_dump_load() - deserialize a tls over tcp session
As lws_tls_session_dump_load_flags() with flags 0