Skip to main content

moq_client_set_tls_cert

Function moq_client_set_tls_cert 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn moq_client_set_tls_cert( client: u32, path: *const c_char, path_len: usize, ) -> i32
Expand description

Present this PEM certificate chain when the relay requires mTLS.

Only certificates are read from the file; any private keys in it are ignored. Must be paired with moq_client_set_tls_key or the connect fails. A NULL or empty path clears it.

Returns zero on success, or a negative code if the handle is unknown.

ยงSafety

  • The caller must ensure that path is NULL or a valid pointer to path_len bytes.