]> git.sesse.net Git - vlc/blobdiff - modules/misc/gnutls.c
Partially fix parsing of npt=
[vlc] / modules / misc / gnutls.c
index 52c294bc72b9a25ba01745eb4abce64002ad7e89..622807bdfd7e7d640359497dff78b67a7a9a7ff6 100644 (file)
@@ -29,7 +29,7 @@
 # include "config.h"
 #endif
 
-#include <vlc/vlc.h>
+#include <vlc_common.h>
 #include <vlc_plugin.h>
 #include <errno.h>
 #include <time.h>
@@ -46,8 +46,8 @@
 # include <io.h>
 #else
 # include <unistd.h>
-# include <fcntl.h>
 #endif
+# include <fcntl.h>
 
 
 #include <vlc_tls.h>
@@ -65,6 +65,8 @@
 
 #include "dhparams.h"
 
+#include <assert.h>
+
 /*****************************************************************************
  * Module descriptor
  *****************************************************************************/
@@ -85,7 +87,7 @@ static void CloseServer (vlc_object_t *);
 
 vlc_module_begin();
     set_shortname( "GnuTLS" );
-    set_description( _("GnuTLS transport layer security") );
+    set_description( N_("GnuTLS transport layer security") );
     set_capability( "tls client", 1 );
     set_callbacks( OpenClient, CloseClient );
     set_category( CAT_ADVANCED );
@@ -95,7 +97,7 @@ vlc_module_begin();
     add_obsolete_bool( "tls-check-hostname" );
 
     add_submodule();
-        set_description( _("GnuTLS server") );
+        set_description( N_("GnuTLS server") );
         set_capability( "tls server", 1 );
         set_category( CAT_ADVANCED );
         set_subcategory( SUBCAT_ADVANCED_MISC );
@@ -681,8 +683,9 @@ static int OpenClient (vlc_object_t *obj)
 
     const char *confdir = config_GetConfDir ();
     {
-        char path[strlen (confdir) + sizeof ("/ca-certificates.crt")];
-        sprintf (path, "%s/ca-certificates.crt", confdir);
+        char path[strlen (confdir)
+                   + sizeof ("/ssl/certs/ca-certificates.crt")];
+        sprintf (path, "%s/ssl/certs/ca-certificates.crt", confdir);
         gnutls_Addx509File (VLC_OBJECT (p_session),
                             p_sys->x509_cred, path, false);
     }