Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
c1cb1da8
Commit
c1cb1da8
authored
Apr 23, 2006
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use Doxygen syntax for comments
parent
ffa12f46
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
48 deletions
+48
-48
modules/misc/gnutls.c
modules/misc/gnutls.c
+48
-48
No files found.
modules/misc/gnutls.c
View file @
c1cb1da8
...
...
@@ -186,11 +186,9 @@ _get_Bool( vlc_object_t *p_this, const char *var )
#define get_Bool( a, b ) _get_Bool( (vlc_object_t *)(a), (b) )
/*****************************************************************************
* tls_Send:
*****************************************************************************
/**
* Sends data through a TLS session.
*
****************************************************************************
/
*/
static
int
gnutls_Send
(
void
*
p_session
,
const
void
*
buf
,
int
i_length
)
{
...
...
@@ -205,11 +203,9 @@ gnutls_Send( void *p_session, const void *buf, int i_length )
}
/*****************************************************************************
* tls_Recv:
*****************************************************************************
/**
* Receives data through a TLS session.
*
****************************************************************************
/
*/
static
int
gnutls_Recv
(
void
*
p_session
,
void
*
buf
,
int
i_length
)
{
...
...
@@ -361,9 +357,19 @@ gnutls_HandshakeAndValidate( tls_session_t *p_session )
return
val
;
}
/**
* Starts negociation of a TLS session.
*
* @param fd stream socket already connected with the peer.
* @param psz_hostname if not NULL, hostname to mention as a Server Name.
*
* @return -1 on error (you need not and must not call tls_SessionClose),
* 0 on succesful handshake completion, 1 if more would-be blocking recv is
* needed, 2 if more would-be blocking send is required.
*/
static
int
gnutls_BeginHandshake
(
tls_session_t
*
p_session
,
int
fd
,
const
char
*
psz_hostname
)
const
char
*
psz_hostname
)
{
tls_session_sys_t
*
p_sys
;
...
...
@@ -389,11 +395,10 @@ gnutls_BeginHandshake( tls_session_t *p_session, int fd,
return
p_session
->
pf_handshake2
(
p_session
);
}
/*****************************************************************************
* tls_SessionClose:
*****************************************************************************
/**
* Terminates TLS session and releases session data.
*****************************************************************************/
* You still have to close the socket yourself.
*/
static
void
gnutls_SessionClose
(
tls_session_t
*
p_session
)
{
...
...
@@ -544,11 +549,9 @@ gnutls_Addx509File( vlc_object_t *p_this,
}
/*****************************************************************************
* tls_ClientCreate:
*****************************************************************************
* Initializes client-side TLS session data.
*****************************************************************************/
/**
* Initializes a client-side TLS session.
*/
static
tls_session_t
*
gnutls_ClientCreate
(
tls_t
*
p_tls
)
{
...
...
@@ -685,9 +688,9 @@ error:
}
/**
***************************************************************************
* TLS session resumption callbacks
*
****************************************************************************
/
/**
* TLS session resumption callbacks
(server-side)
*/
static
int
cb_store
(
void
*
p_server
,
gnutls_datum
key
,
gnutls_datum
data
)
{
tls_server_sys_t
*
p_sys
=
((
tls_server_t
*
)
p_server
)
->
p_sys
;
...
...
@@ -783,11 +786,9 @@ static int cb_delete( void *p_server, gnutls_datum key )
}
/*****************************************************************************
* tls_ServerSessionPrepare:
*****************************************************************************
* Initializes server-side TLS session data.
*****************************************************************************/
/**
* Initializes a server-side TLS session.
*/
static
tls_session_t
*
gnutls_ServerSessionPrepare
(
tls_server_t
*
p_server
)
{
...
...
@@ -872,11 +873,9 @@ error:
}
/*****************************************************************************
* tls_ServerDelete:
*****************************************************************************
* Releases data allocated with tls_ServerCreate.
*****************************************************************************/
/**
* Releases data allocated with tls_ServerCreate().
*/
static
void
gnutls_ServerDelete
(
tls_server_t
*
p_server
)
{
...
...
@@ -896,11 +895,12 @@ gnutls_ServerDelete( tls_server_t *p_server )
}
/*****************************************************************************
* tls_ServerAddCA:
*****************************************************************************
/**
* Adds one or more certificate authorities.
* Returns -1 on error, 0 on success.
*
* @param psz_ca_path (Unicode) path to an x509 certificates list.
*
* @return -1 on error, 0 on success.
*****************************************************************************/
static
int
gnutls_ServerAddCA
(
tls_server_t
*
p_server
,
const
char
*
psz_ca_path
)
...
...
@@ -931,12 +931,13 @@ gnutls_ServerAddCA( tls_server_t *p_server, const char *psz_ca_path )
}
/*****************************************************************************
* tls_ServerAddCRL:
*****************************************************************************
/**
* Adds a certificates revocation list to be sent to TLS clients.
* Returns -1 on error, 0 on success.
*****************************************************************************/
*
* @param psz_crl_path (Unicode) path of the CRL file.
*
* @return -1 on error, 0 on success.
*/
static
int
gnutls_ServerAddCRL
(
tls_server_t
*
p_server
,
const
char
*
psz_crl_path
)
{
...
...
@@ -959,12 +960,11 @@ gnutls_ServerAddCRL( tls_server_t *p_server, const char *psz_crl_path )
}
/*****************************************************************************
* tls_ServerCreate:
*****************************************************************************
/**
* Allocates a whole server's TLS credentials.
* Returns NULL on error.
*****************************************************************************/
*
* @return NULL on error.
*/
static
tls_server_t
*
gnutls_ServerCreate
(
tls_t
*
p_tls
,
const
char
*
psz_cert_path
,
const
char
*
psz_key_path
)
...
...
@@ -1069,9 +1069,9 @@ error:
}
/**
***************************************************************************
* gcrypt thread option VLC implementation
:
*
****************************************************************************
/
/**
* gcrypt thread option VLC implementation
*/
vlc_object_t
*
__p_gcry_data
;
static
int
gcry_vlc_mutex_init
(
void
**
p_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