Commit b0ca502b authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Create the user certificate directories automagically

parent a4cee8cc
...@@ -589,9 +589,17 @@ gnutls_Addx509Directory( vlc_object_t *p_this, ...@@ -589,9 +589,17 @@ gnutls_Addx509Directory( vlc_object_t *p_this,
dir = utf8_opendir( psz_dirname ); dir = utf8_opendir( psz_dirname );
if( dir == NULL ) if( dir == NULL )
{ {
msg_Warn( p_this, "cannot open directory (%s): %m", psz_dirname ); if (errno != ENOENT)
{
msg_Err (p_this, "cannot open directory (%s): %m", psz_dirname);
return VLC_EGENERIC; return VLC_EGENERIC;
} }
msg_Dbg (p_this, "creating empty certificate directory: %s",
psz_dirname);
utf8_mkdir (psz_dirname);
return VLC_SUCCESS;
}
#ifdef S_ISLNK #ifdef S_ISLNK
else else
{ {
...@@ -730,6 +738,9 @@ static int OpenClient (vlc_object_t *obj) ...@@ -730,6 +738,9 @@ static int OpenClient (vlc_object_t *obj)
goto error; goto error;
} }
sprintf (path, "%s/ssl", homedir);
utf8_mkdir (path);
if (var_CreateGetBool (obj, "tls-check-cert")) if (var_CreateGetBool (obj, "tls-check-cert"))
{ {
sprintf (path, "%s/ssl/certs", homedir); sprintf (path, "%s/ssl/certs", homedir);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment