Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
f5b7eea1
Commit
f5b7eea1
authored
Jul 23, 2011
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DVB: remove dead code for TLS and ACL support
parent
af7491b0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
46 deletions
+6
-46
modules/access/dvb/http.c
modules/access/dvb/http.c
+6
-46
No files found.
modules/access/dvb/http.c
View file @
f5b7eea1
...
...
@@ -32,7 +32,6 @@
#include <vlc_common.h>
#include <vlc_access.h>
#include <vlc_httpd.h>
#include <vlc_acl.h>
#include <sys/types.h>
...
...
@@ -65,12 +64,9 @@ static int HttpCallback( httpd_file_sys_t *p_args,
int
HTTPOpen
(
access_t
*
p_access
)
{
access_sys_t
*
p_sys
=
p_access
->
p_sys
;
char
*
psz_address
,
*
psz_cert
=
NULL
,
*
psz_key
=
NULL
,
*
psz_ca
=
NULL
,
*
psz_crl
=
NULL
,
*
psz_user
=
NULL
,
*
psz_password
=
NULL
,
*
psz_acl
=
NULL
;
char
*
psz_address
,
*
psz_user
=
NULL
,
*
psz_password
=
NULL
;
int
i_port
=
0
;
char
psz_tmp
[
10
];
vlc_acl_t
*
p_acl
=
NULL
;
httpd_file_sys_t
*
f
;
vlc_mutex_init
(
&
p_sys
->
httpd_mutex
);
...
...
@@ -91,24 +87,8 @@ int HTTPOpen( access_t *p_access )
else
return
VLC_SUCCESS
;
/* determine SSL configuration */
psz_cert
=
var_InheritString
(
p_access
,
"dvb-http-intf-cert"
);
if
(
psz_cert
!=
NULL
)
{
msg_Dbg
(
p_access
,
"enabling TLS for HTTP interface (cert file: %s)"
,
psz_cert
);
psz_key
=
var_InheritString
(
p_access
,
"dvb-http-intf-key"
);
psz_ca
=
var_InheritString
(
p_access
,
"dvb-http-intf-ca"
);
psz_crl
=
var_InheritString
(
p_access
,
"dvb-http-intf-crl"
);
if
(
i_port
<=
0
)
i_port
=
8443
;
}
else
{
if
(
i_port
<=
0
)
i_port
=
8082
;
}
/* Ugly hack to allow to run several HTTP servers on different ports. */
sprintf
(
psz_tmp
,
":%d"
,
i_port
+
1
);
...
...
@@ -116,14 +96,8 @@ int HTTPOpen( access_t *p_access )
msg_Dbg
(
p_access
,
"base %s:%d"
,
psz_address
,
i_port
);
p_sys
->
p_httpd_host
=
httpd_TLSHostNew
(
VLC_OBJECT
(
p_access
),
psz_address
,
i_port
,
psz_cert
,
psz_key
,
psz_ca
,
psz_crl
);
free
(
psz_cert
);
free
(
psz_key
);
free
(
psz_ca
);
free
(
psz_crl
);
p_sys
->
p_httpd_host
=
httpd_HostNew
(
VLC_OBJECT
(
p_access
),
psz_address
,
i_port
);
if
(
p_sys
->
p_httpd_host
==
NULL
)
{
msg_Err
(
p_access
,
"cannot listen on %s:%d"
,
psz_address
,
i_port
);
...
...
@@ -134,31 +108,17 @@ int HTTPOpen( access_t *p_access )
psz_user
=
var_GetNonEmptyString
(
p_access
,
"dvb-http-user"
);
psz_password
=
var_GetNonEmptyString
(
p_access
,
"dvb-http-password"
);
psz_acl
=
var_GetNonEmptyString
(
p_access
,
"dvb-http-acl"
);
if
(
psz_acl
!=
NULL
)
{
p_acl
=
ACL_Create
(
p_access
,
false
);
if
(
ACL_LoadFile
(
p_acl
,
psz_acl
)
)
{
ACL_Destroy
(
p_acl
);
p_acl
=
NULL
;
}
}
/* Declare an index.html file. */
f
=
malloc
(
sizeof
(
httpd_file_sys_t
)
);
f
->
p_access
=
p_access
;
f
->
p_file
=
httpd_FileNew
(
p_sys
->
p_httpd_host
,
"/index.html"
,
"text/html; charset=UTF-8"
,
psz_user
,
psz_password
,
p_acl
,
psz_user
,
psz_password
,
NULL
,
HttpCallback
,
f
);
free
(
psz_user
);
free
(
psz_password
);
free
(
psz_acl
);
if
(
p_acl
!=
NULL
)
ACL_Destroy
(
p_acl
);
if
(
f
->
p_file
==
NULL
)
{
...
...
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