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
10de5cff
Commit
10de5cff
authored
Dec 20, 2015
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tls: improve documentation
parent
3b6bb8ae
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
17 deletions
+14
-17
include/vlc_tls.h
include/vlc_tls.h
+14
-4
modules/misc/gnutls.c
modules/misc/gnutls.c
+0
-13
No files found.
include/vlc_tls.h
View file @
10de5cff
...
...
@@ -75,18 +75,28 @@ vlc_tls_t *vlc_tls_SessionCreate (vlc_tls_creds_t *, int fd, const char *host,
const
char
*
const
*
alpn
);
/**
*
Shut
s a TLS session down.
*
Destroy
s a TLS session down.
*
* Shuts a TLS session down (if it was succesfully established) and releases
* all resources. The underlying connection is preserved. Use vlc_tls_Close()
* instead to shut it down at the same.
* All resources associated with the TLS session are released.
*
* If the session was established succesfully, then shutdown cleanly, the
* underlying socket can be reused. Otherwise, it must be closed. Either way,
* this function does not close the underlying socket: Use vlc_tls_Close()
* instead to close it at the same.
*
* This function is non-blocking and is not a cancellation point.
*/
VLC_API
void
vlc_tls_SessionDelete
(
vlc_tls_t
*
);
/**
* Receives data through a TLS session.
*/
VLC_API
int
vlc_tls_Read
(
vlc_tls_t
*
,
void
*
buf
,
size_t
len
,
bool
waitall
);
VLC_API
char
*
vlc_tls_GetLine
(
vlc_tls_t
*
);
/**
* Sends data through a TLS session.
*/
VLC_API
int
vlc_tls_Write
(
vlc_tls_t
*
,
const
void
*
buf
,
size_t
len
);
/**
...
...
modules/misc/gnutls.c
View file @
10de5cff
...
...
@@ -159,9 +159,6 @@ static ssize_t vlc_gnutls_writev (gnutls_transport_ptr_t ptr,
}
#endif
/**
* Sends data through a TLS session.
*/
static
ssize_t
gnutls_Send
(
vlc_tls_t
*
tls
,
const
void
*
buf
,
size_t
length
)
{
gnutls_session_t
session
=
tls
->
sys
;
...
...
@@ -170,10 +167,6 @@ static ssize_t gnutls_Send (vlc_tls_t *tls, const void *buf, size_t length)
return
(
val
<
0
)
?
gnutls_Error
(
tls
,
val
)
:
val
;
}
/**
* Receives data through a TLS session.
*/
static
ssize_t
gnutls_Recv
(
vlc_tls_t
*
tls
,
void
*
buf
,
size_t
length
)
{
gnutls_session_t
session
=
tls
->
sys
;
...
...
@@ -190,12 +183,6 @@ static int gnutls_Shutdown(vlc_tls_t *tls, bool duplex)
return
(
val
<
0
)
?
gnutls_Error
(
tls
,
val
)
:
0
;
}
/**
* Terminates a TLS session.
*
* This terminates a TLS session and releases session data.
* The underlying socket must be closed separately.
*/
static
void
gnutls_Close
(
vlc_tls_t
*
tls
)
{
gnutls_session_t
session
=
tls
->
sys
;
...
...
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