VLC 4.0.0-dev
Loading...
Searching...
No Matches
keystore.c File Reference
Include dependency graph for keystore.c:

Functions

static vlc_keystore * keystore_create (vlc_object_t *p_parent, const char *psz_name)
vlc_keystore * vlc_keystore_create (vlc_object_t *p_parent)
 Create a keystore object.
void vlc_keystore_release (vlc_keystore *p_keystore)
 Release a keystore object.
int vlc_keystore_store (vlc_keystore *p_keystore, const char *const ppsz_values[KEY_MAX], const uint8_t *p_secret, ssize_t i_secret_len, const char *psz_label)
 Store a secret associated with a set of key/values.
unsigned int vlc_keystore_find (vlc_keystore *p_keystore, const char *const ppsz_values[KEY_MAX], vlc_keystore_entry **pp_entries)
 Find all entries that match a set of key/values.
unsigned int vlc_keystore_remove (vlc_keystore *p_keystore, const char *const ppsz_values[KEY_MAX])
 Remove all entries that match a set of key/values.
void vlc_keystore_release_entries (vlc_keystore_entry *p_entries, unsigned int i_count)
 Release the list of entries returned by vlc_keystore_find().
int libvlc_InternalKeystoreInit (libvlc_int_t *p_libvlc)
void libvlc_InternalKeystoreClean (libvlc_int_t *p_libvlc)
static vlc_keystore * get_memory_keystore (vlc_object_t *p_obj)
static bool entry_is_bearer (const vlc_keystore_entry *p_entry)
static vlc_keystore_entry * find_closest_path (vlc_keystore_entry *p_entries, unsigned i_count, const char *psz_path)
static bool is_credential_valid (vlc_credential *p_credential)
static bool is_url_valid (const vlc_url_t *p_url)
static bool protocol_set_port (const vlc_url_t *p_url, char *psz_port)
static bool protocol_is_smb (const vlc_url_t *p_url)
static bool protocol_store_path (const vlc_url_t *p_url)
static void smb_split_domain (vlc_credential *p_credential)
static void credential_find_keystore (vlc_credential *p_credential, vlc_keystore *p_keystore)
void vlc_credential_init (vlc_credential *p_credential, const vlc_url_t *p_url)
 Init a credential struct.
void vlc_credential_clean (vlc_credential *p_credential)
 Clean a credential struct.
int vlc_credential_get (vlc_credential *p_credential, vlc_object_t *p_parent, const char *psz_option_username, const char *psz_option_password, const char *psz_dialog_title, const char *psz_dialog_fmt,...)
 Get a username/password couple.
static bool bearer_realm_matches (const vlc_keystore_entry *p_entry, const char *psz_realm)
static bool bearer_has_scope (vlc_keystore *p_keystore, const char *ppsz_values[KEY_MAX], const char *psz_realm, const char *psz_scope, const vlc_keystore_entry *p_token)
static bool bearer_find (vlc_credential *p_credential, vlc_keystore *p_keystore, const char *ppsz_values[KEY_MAX], bool b_unscoped)
static bool bearer_find_realm (vlc_credential *p_credential, vlc_keystore *p_keystore, const char *ppsz_values[KEY_MAX])
static bool bearer_lookup (vlc_credential *p_credential, vlc_keystore *p_keystore, const char *ppsz_values[KEY_MAX])
static char * bearer_values_init (const vlc_url_t *p_url, const char *psz_realm, char psz_port[21], const char *ppsz_values[KEY_MAX])
int vlc_credential_get_bearer (vlc_credential *p_credential, vlc_object_t *p_parent)
 Look up a bearer token for the URL, realm and scopes set on p_credential.
int libvlc_InternalHttpBearerStore (libvlc_int_t *p_libvlc, const char *psz_origin, const char *psz_realm, const char *const *ppsz_scopes, size_t i_scopes, const char *psz_token)
 Store a bearer token for an HTTPS origin URL in the per-libvlc memory keystore.
bool vlc_credential_store (vlc_credential *p_credential, vlc_object_t *p_parent)
 Store the last dialog credential returned by vlc_credential_get().

Variables

struct { 
   const char *   psz_protocol 
   uint16_t   i_port 
} protocol_default_ports []

Function Documentation

◆ bearer_find()

◆ bearer_find_realm()

bool bearer_find_realm ( vlc_credential * p_credential,
vlc_keystore * p_keystore,
const char * ppsz_values[KEY_MAX] )
static

◆ bearer_has_scope()

bool bearer_has_scope ( vlc_keystore * p_keystore,
const char * ppsz_values[KEY_MAX],
const char * psz_realm,
const char * psz_scope,
const vlc_keystore_entry * p_token )
static

◆ bearer_lookup()

bool bearer_lookup ( vlc_credential * p_credential,
vlc_keystore * p_keystore,
const char * ppsz_values[KEY_MAX] )
static

◆ bearer_realm_matches()

bool bearer_realm_matches ( const vlc_keystore_entry * p_entry,
const char * psz_realm )
static

◆ bearer_values_init()

char * bearer_values_init ( const vlc_url_t * p_url,
const char * psz_realm,
char psz_port[21],
const char * ppsz_values[KEY_MAX] )
static

◆ credential_find_keystore()

◆ entry_is_bearer()

bool entry_is_bearer ( const vlc_keystore_entry * p_entry)
static

◆ find_closest_path()

vlc_keystore_entry * find_closest_path ( vlc_keystore_entry * p_entries,
unsigned i_count,
const char * psz_path )
static

◆ get_memory_keystore()

◆ is_credential_valid()

bool is_credential_valid ( vlc_credential * p_credential)
static

◆ is_url_valid()

bool is_url_valid ( const vlc_url_t * p_url)
static

◆ keystore_create()

◆ libvlc_InternalKeystoreClean()

void libvlc_InternalKeystoreClean ( libvlc_int_t * p_libvlc)

◆ libvlc_InternalKeystoreInit()

int libvlc_InternalKeystoreInit ( libvlc_int_t * p_libvlc)

◆ protocol_is_smb()

bool protocol_is_smb ( const vlc_url_t * p_url)
static

◆ protocol_set_port()

bool protocol_set_port ( const vlc_url_t * p_url,
char * psz_port )
static

◆ protocol_store_path()

bool protocol_store_path ( const vlc_url_t * p_url)
static

◆ smb_split_domain()

void smb_split_domain ( vlc_credential * p_credential)
static

Variable Documentation

◆ i_port

◆ [struct]

struct { ... } protocol_default_ports[]
Initial value:
= {
{ "rtsp", 80 },
{ "http", 80 },
{ "https", 443 },
{ "ftp", 21 },
{ "sftp", 22 },
{ "smb", 445 },
}

Referenced by protocol_set_port().

◆ psz_protocol

const char* psz_protocol