From: RĂ©mi Denis-Courmont Date: Sat, 23 Jul 2011 12:02:02 +0000 (+0300) Subject: DVB: remove dead code for TLS and ACL support X-Git-Tag: 1.2.0-pre1~1648 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=f5b7eea131f15e88667f066c996cc099fd81b44a;hp=af7491b0e06c7c4cabb2854170e9cbbd97decc72;p=vlc DVB: remove dead code for TLS and ACL support --- diff --git a/modules/access/dvb/http.c b/modules/access/dvb/http.c index a13abf06f9..c30a7185a8 100644 --- a/modules/access/dvb/http.c +++ b/modules/access/dvb/http.c @@ -32,7 +32,6 @@ #include #include #include -#include #include @@ -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; - } + 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 ) {