Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
fefa2c56
Commit
fefa2c56
authored
Jan 12, 2016
by
Thomas Guillem
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
credential: store returns true if creds come from the keystore
parent
9e06d25b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
include/vlc_keystore.h
include/vlc_keystore.h
+3
-1
src/misc/keystore.c
src/misc/keystore.c
+5
-2
No files found.
include/vlc_keystore.h
View file @
fefa2c56
...
@@ -185,6 +185,7 @@ struct vlc_credential
...
@@ -185,6 +185,7 @@ struct vlc_credential
char
*
psz_dialog_username
;
char
*
psz_dialog_username
;
char
*
psz_dialog_password
;
char
*
psz_dialog_password
;
bool
b_from_keystore
;
bool
b_store
;
bool
b_store
;
};
};
...
@@ -240,7 +241,8 @@ vlc_credential_get(vlc_credential *p_credential, vlc_object_t *p_parent,
...
@@ -240,7 +241,8 @@ vlc_credential_get(vlc_credential *p_credential, vlc_object_t *p_parent,
* This function will store the credential only if it comes from the dialog and
* This function will store the credential only if it comes from the dialog and
* if the vlc_keystore object is valid.
* if the vlc_keystore object is valid.
*
*
* @return true if credential was stored, false otherwise
* @return true if the credential was stored or comes from the keystore, false
* otherwise
*/
*/
VLC_API
bool
VLC_API
bool
vlc_credential_store
(
vlc_credential
*
p_credential
);
vlc_credential_store
(
vlc_credential
*
p_credential
);
...
...
src/misc/keystore.c
View file @
fefa2c56
...
@@ -274,6 +274,7 @@ credential_find_keystore(vlc_credential *p_credential)
...
@@ -274,6 +274,7 @@ credential_find_keystore(vlc_credential *p_credential)
{
{
p_credential
->
psz_password
=
(
const
char
*
)
p_entry
->
p_secret
;
p_credential
->
psz_password
=
(
const
char
*
)
p_entry
->
p_secret
;
p_credential
->
psz_username
=
p_entry
->
ppsz_values
[
KEY_USER
];
p_credential
->
psz_username
=
p_entry
->
ppsz_values
[
KEY_USER
];
p_credential
->
b_from_keystore
=
true
;
}
}
}
}
}
}
...
@@ -323,6 +324,7 @@ vlc_credential_get(vlc_credential *p_credential, vlc_object_t *p_parent,
...
@@ -323,6 +324,7 @@ vlc_credential_get(vlc_credential *p_credential, vlc_object_t *p_parent,
return
false
;
return
false
;
}
}
p_credential
->
b_from_keystore
=
false
;
/* Don't set username to NULL, we may want to use the last one set */
/* Don't set username to NULL, we may want to use the last one set */
p_credential
->
psz_password
=
NULL
;
p_credential
->
psz_password
=
NULL
;
...
@@ -430,8 +432,9 @@ vlc_credential_get(vlc_credential *p_credential, vlc_object_t *p_parent,
...
@@ -430,8 +432,9 @@ vlc_credential_get(vlc_credential *p_credential, vlc_object_t *p_parent,
bool
bool
vlc_credential_store
(
vlc_credential
*
p_credential
)
vlc_credential_store
(
vlc_credential
*
p_credential
)
{
{
if
(
!
p_credential
->
p_keystore
||
!
p_credential
->
b_store
)
if
(
!
p_credential
->
p_keystore
||
!
p_credential
->
b_store
return
false
;
||
p_credential
->
b_from_keystore
)
return
p_credential
->
b_from_keystore
;
const
vlc_url_t
*
p_url
=
p_credential
->
p_url
;
const
vlc_url_t
*
p_url
=
p_credential
->
p_url
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment