VLC 4.0.0-dev
|
Data Structures | |
struct | vlc_tls_server |
TLS server-side credentials. More... | |
struct | vlc_tls_server_operations |
Typedefs | |
typedef struct vlc_tls_server | vlc_tls_server_t |
TLS server-side credentials. | |
Functions | |
vlc_tls_server_t * | vlc_tls_ServerCreate (vlc_object_t *tls, const char *cert, const char *key) |
Allocates server TLS credentials. | |
static int | vlc_tls_SessionHandshake (vlc_tls_server_t *crd, vlc_tls_t *tls) |
vlc_tls_t * | vlc_tls_ServerSessionCreate (vlc_tls_server_t *creds, vlc_tls_t *sock, const char *const *alpn) |
Creates a TLS server session. | |
void | vlc_tls_ServerDelete (vlc_tls_server_t *) |
Releases server-side TLS credentials. | |
typedef struct vlc_tls_server vlc_tls_server_t |
TLS server-side 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_server_t * vlc_tls_ServerCreate | ( | vlc_object_t * | tls, |
const char * | cert, | ||
const char * | key | ||
) |
Allocates server TLS credentials.
tls | the TLS stream object |
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_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_HostNew().
void vlc_tls_ServerDelete | ( | vlc_tls_server_t * | crd | ) |
Releases server-side TLS credentials.
Releases data allocated with vlc_tls_ServerCreate().
References vlc_tls_server_operations::destroy, vlc_tls_server::ops, VLC_OBJECT, vlc_object_delete, and vlc_objres_clear().
Referenced by httpd_HostCreate(), and httpd_HostDelete().
vlc_tls_t * vlc_tls_ServerSessionCreate | ( | vlc_tls_server_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 |
sock | the TLS stream object |
alpn | NULL-terminated list of Application Layer Protocols to negotiate, or NULL to not negotiate protocols |
References vlc_tls_server_operations::open, vlc_tls_server::ops, vlc_tls::p, vlc_restorecancel(), and vlc_savecancel().
Referenced by httpdLoop().
|
inlinestatic |
References vlc_tls_server_operations::handshake, and vlc_tls_server::ops.
Referenced by httpd_ClientTlsHandshake().