VLC 4.0.0-dev
|
Data Structures | |
struct | vlc_tls_client |
TLS client-side credentials. More... | |
struct | vlc_tls_client_operations |
Typedefs | |
typedef struct vlc_tls_client | vlc_tls_client_t |
TLS client-side credentials. More... | |
Functions | |
vlc_tls_client_t * | vlc_tls_ClientCreate (vlc_object_t *) |
Allocates TLS client-side credentials. More... | |
void | vlc_tls_ClientDelete (vlc_tls_client_t *) |
Releases TLS client-side credentials. More... | |
vlc_tls_t * | vlc_tls_ClientSessionCreate (vlc_tls_client_t *creds, vlc_tls_t *sock, const char *host, const char *service, const char *const *alpn, char **alp) |
Initiates a client TLS session. More... | |
typedef struct vlc_tls_client vlc_tls_client_t |
TLS client-side credentials.
This structure contains the credentials for establishing TLS sessions on client side, essentially the set of trusted root Certificate Authorities with which to validate certificate chains presented by servers.
vlc_tls_client_t * vlc_tls_ClientCreate | ( | vlc_object_t * | obj | ) |
Allocates TLS client-side credentials.
Credentials can be cached and reused across multiple TLS sessions.
References vlc_object_t::logger, msg_Err, unlikely, vlc_custom_create, vlc_module_map(), vlc_module_match(), VLC_OBJECT, vlc_object_delete, vlc_objres_clear(), and VLC_SUCCESS.
Referenced by vlc_https_request().
void vlc_tls_ClientDelete | ( | vlc_tls_client_t * | crd | ) |
Releases TLS client-side credentials.
Releases data allocated with vlc_tls_ClientCreate().
References vlc_tls_client_operations::destroy, vlc_tls_client::ops, VLC_OBJECT, vlc_object_delete, and vlc_objres_clear().
Referenced by vlc_http_mgr_destroy().
vlc_tls_t * vlc_tls_ClientSessionCreate | ( | vlc_tls_client_t * | creds, |
vlc_tls_t * | sock, | ||
const char * | host, | ||
const char * | service, | ||
const char *const * | alpn, | ||
char ** | alp | ||
) |
Initiates a client TLS session.
Initiates a Transport Layer Security (TLS) session as the client side, using trusted root CAs previously loaded with vlc_tls_ClientCreate().
This is a blocking network operation and may be a thread cancellation point.
creds | X.509 credentials, i.e. set of root certificates of trusted certificate authorities |
sock | socket through which to establish the secure channel |
hostname | expected server name, used both as Server Name Indication and as expected Common Name of the peer certificate [IN] |
service | unique identifier for the service to connect to (only used locally for certificates database) [IN] |
alpn | NULL-terminated list of Application Layer Protocols to negotiate, or NULL to not negotiate protocols [IN] |
alp | storage space for the negotiated Application Layer Protocol or NULL if negotiation was not performed [OUT] |
References cleanup_tls(), pollfd::events, pollfd::fd, vlc_tls_client_operations::handshake, MS_FROM_VLC_TICK, msg_Err, vlc_tls_client_operations::open, vlc_tls_client::ops, vlc_tls::p, POLLIN, POLLOUT, var_InheritInteger(), vlc_cleanup_pop, vlc_cleanup_push, vlc_killed(), vlc_poll_i11e(), vlc_restorecancel(), vlc_savecancel(), VLC_TICK_FROM_MS, vlc_tick_now(), vlc_tls_GetPollFD(), and vlc_tls_SessionDelete().
Referenced by vlc_https_connect_proxy(), and vlc_tls_SocketOpenTLS().