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
f48b0f3f
Commit
f48b0f3f
authored
Dec 16, 2015
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tls: pass credentials pointer to handshake function
parent
7be25353
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
10 deletions
+13
-10
include/vlc_tls.h
include/vlc_tls.h
+3
-3
modules/misc/gnutls.c
modules/misc/gnutls.c
+6
-4
modules/misc/securetransport.c
modules/misc/securetransport.c
+3
-2
src/network/tls.c
src/network/tls.c
+1
-1
No files found.
include/vlc_tls.h
View file @
f48b0f3f
...
...
@@ -92,8 +92,8 @@ struct vlc_tls_creds
int
(
*
open
)
(
vlc_tls_creds_t
*
,
vlc_tls_t
*
,
int
fd
,
const
char
*
host
,
const
char
*
const
*
alpn
);
int
(
*
handshake
)
(
vlc_tls_t
*
,
const
char
*
host
,
const
char
*
service
,
char
**
/*restrict*/
alp
);
int
(
*
handshake
)
(
vlc_tls_creds_t
*
,
vlc_tls_t
*
,
const
char
*
host
,
const
char
*
service
,
char
**
/*restrict*/
alp
);
};
/**
...
...
@@ -120,7 +120,7 @@ vlc_tls_creds_t *vlc_tls_ServerCreate (vlc_object_t *,
static
inline
int
vlc_tls_SessionHandshake
(
vlc_tls_creds_t
*
crd
,
vlc_tls_t
*
tls
)
{
return
crd
->
handshake
(
tls
,
NULL
,
NULL
,
NULL
);
return
crd
->
handshake
(
crd
,
tls
,
NULL
,
NULL
,
NULL
);
}
/**
...
...
modules/misc/gnutls.c
View file @
f48b0f3f
...
...
@@ -353,8 +353,9 @@ static int gnutls_ClientSessionOpen (vlc_tls_creds_t *crd, vlc_tls_t *tls,
return
VLC_SUCCESS
;
}
static
int
gnutls_ClientHandshake
(
vlc_tls_t
*
tls
,
const
char
*
host
,
const
char
*
service
,
char
**
restrict
alp
)
static
int
gnutls_ClientHandshake
(
vlc_tls_creds_t
*
creds
,
vlc_tls_t
*
tls
,
const
char
*
host
,
const
char
*
service
,
char
**
restrict
alp
)
{
int
val
=
gnutls_ContinueHandshake
(
tls
,
alp
);
if
(
val
)
...
...
@@ -542,8 +543,9 @@ static int gnutls_ServerSessionOpen (vlc_tls_creds_t *crd, vlc_tls_t *tls,
return
gnutls_SessionOpen
(
tls
,
GNUTLS_SERVER
,
sys
->
x509_cred
,
fd
,
alpn
);
}
static
int
gnutls_ServerHandshake
(
vlc_tls_t
*
tls
,
const
char
*
host
,
const
char
*
service
,
char
**
restrict
alp
)
static
int
gnutls_ServerHandshake
(
vlc_tls_creds_t
*
crd
,
vlc_tls_t
*
tls
,
const
char
*
host
,
const
char
*
service
,
char
**
restrict
alp
)
{
(
void
)
host
;
(
void
)
service
;
return
gnutls_ContinueHandshake
(
tls
,
alp
);
...
...
modules/misc/securetransport.c
View file @
f48b0f3f
...
...
@@ -378,8 +378,9 @@ out:
* 1 if more would-be blocking recv is needed,
* 2 if more would-be blocking send is required.
*/
static
int
st_Handshake
(
vlc_tls_t
*
session
,
const
char
*
host
,
const
char
*
service
,
char
**
restrict
alp
)
{
static
int
st_Handshake
(
vlc_tls_creds_t
*
crd
,
vlc_tls_t
*
session
,
const
char
*
host
,
const
char
*
service
,
char
**
restrict
alp
)
{
VLC_UNUSED
(
service
);
vlc_tls_sys_t
*
sys
=
session
->
sys
;
...
...
src/network/tls.c
View file @
f48b0f3f
...
...
@@ -178,7 +178,7 @@ vlc_tls_t *vlc_tls_ClientSessionCreate (vlc_tls_creds_t *crd, int fd,
ufd
[
0
].
fd
=
fd
;
vlc_cleanup_push
(
cleanup_tls
,
session
);
while
((
val
=
crd
->
handshake
(
session
,
host
,
service
,
alp
))
!=
0
)
while
((
val
=
crd
->
handshake
(
crd
,
session
,
host
,
service
,
alp
))
!=
0
)
{
if
(
val
<
0
)
{
...
...
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