| VLC
    3.0.18
    | 

| Data Structures | |
| struct | vlc_tls_creds | 
| TLS credentials.  More... | |
| Typedefs | |
| typedef struct vlc_tls_creds | vlc_tls_creds_t | 
| TLS credentials.  More... | |
| Functions | |
| vlc_tls_creds_t * | vlc_tls_ClientCreate (vlc_object_t *) | 
| Allocates TLS credentials for a client.  More... | |
| vlc_tls_creds_t * | vlc_tls_ServerCreate (vlc_object_t *, const char *cert, const char *key) | 
| Allocates server TLS credentials.  More... | |
| static int | vlc_tls_SessionHandshake (vlc_tls_creds_t *crd, vlc_tls_t *tls) | 
| void | vlc_tls_Delete (vlc_tls_creds_t *) | 
| Releases TLS credentials.  More... | |
| vlc_tls_t * | vlc_tls_ClientSessionCreate (vlc_tls_creds_t *creds, vlc_tls_t *sock, const char *host, const char *service, const char *const *alpn, char **alp) | 
| Initiates a client TLS session.  More... | |
| vlc_tls_t * | vlc_tls_ServerSessionCreate (vlc_tls_creds_t *creds, vlc_tls_t *sock, const char *const *alpn) | 
| Creates a TLS server session.  More... | |
| typedef struct vlc_tls_creds vlc_tls_creds_t | 
TLS credentials.
This structure contains the credentials for establishing TLS sessions. This includes root Certificate Authorities (on client side), trust and cryptographic parameters, public certificates and private keys.
| vlc_tls_creds_t* vlc_tls_ClientCreate | ( | vlc_object_t * | ) | 
Allocates TLS credentials for a client.
Credentials can be cached and reused across multiple TLS sessions.
References vlc_tls_creds::module, msg_Err, tls_client_load(), unlikely, vlc_custom_create, vlc_module_load, and vlc_object_release.
Referenced by vlc_https_request().
| vlc_tls_t* vlc_tls_ClientSessionCreate | ( | vlc_tls_creds_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_creds::handshake, mdate(), msg_Err, POLLIN, POLLOUT, var_InheritInteger, vlc_cleanup_pop, vlc_cleanup_push, vlc_killed(), vlc_poll_i11e(), vlc_restorecancel(), vlc_savecancel(), vlc_tls_GetFD(), vlc_tls_SessionCreate(), and vlc_tls_SessionDelete().
Referenced by vlc_https_connect_proxy(), vlc_tls_ClientSessionCreateFD(), and vlc_tls_SocketOpenTLS().
| void vlc_tls_Delete | ( | vlc_tls_creds_t * | ) | 
Releases TLS credentials.
Releases data allocated with vlc_tls_ClientCreate() or vlc_tls_ServerCreate().
| srv | object to be destroyed (or NULL) | 
References vlc_tls_creds::module, tls_unload(), vlc_module_unload, and vlc_object_release.
Referenced by vlc_http_mgr_destroy().
| vlc_tls_creds_t* vlc_tls_ServerCreate | ( | vlc_object_t * | , | 
| const char * | cert, | ||
| const char * | key | ||
| ) | 
Allocates server TLS credentials.
| cert | path to an x509 certificate (required) | 
| key | path to the PKCS private key for the certificate, or NULL to use cert path | 
References vlc_tls_creds::module, msg_Err, tls_server_load(), unlikely, vlc_custom_create, vlc_module_load, and vlc_object_release.
| vlc_tls_t* vlc_tls_ServerSessionCreate | ( | vlc_tls_creds_t * | creds, | 
| vlc_tls_t * | sock, | ||
| const char *const * | alpn | ||
| ) | 
Creates a TLS server session.
Allocates a Transport Layer Security (TLS) session as the server side, using cryptographic keys pair and X.509 certificates chain already loaded with vlc_tls_ServerCreate().
Unlike vlc_tls_ClientSessionCreate(), this function does not perform any actual network I/O. vlc_tls_SessionHandshake() must be used to perform the TLS handshake before sending and receiving data through the TLS session.
This function is non-blocking and is not a cancellation point.
| creds | server credentials, i.e. keys pair and X.509 certificates chain | 
| alpn | NULL-terminated list of Application Layer Protocols to negotiate, or NULL to not negotiate protocols | 
References vlc_tls_SessionCreate().
| 
 | inlinestatic | 
References vlc_tls_creds::handshake.
 1.8.16
 1.8.16