]> git.sesse.net Git - vlc/commitdiff
GnuTLS: use vlc_strerror_c()
authorRémi Denis-Courmont <remi@remlab.net>
Sun, 29 Dec 2013 13:55:39 +0000 (15:55 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Sun, 29 Dec 2013 13:59:57 +0000 (15:59 +0200)
modules/misc/gnutls.c

index 4a6056abe1d237c350c9b3202bdd97fb61ac5d45..83d154f46e76bee31acb8b7ffb6e6db822d5342b 100644 (file)
@@ -566,7 +566,8 @@ static int gnutls_AddCA (vlc_tls_creds_t *crd, const char *path)
     block_t *block = block_FilePath (path);
     if (block == NULL)
     {
-        msg_Err (crd, "cannot read trusted CA from %s: %m", path);
+        msg_Err (crd, "cannot read trusted CA from %s: %s", path,
+                 vlc_strerror_c(errno));
         return VLC_EGENERIC;
     }
 
@@ -605,7 +606,8 @@ static int gnutls_AddCRL (vlc_tls_creds_t *crd, const char *path)
     block_t *block = block_FilePath (path);
     if (block == NULL)
     {
-        msg_Err (crd, "cannot read CRL from %s: %m", path);
+        msg_Err (crd, "cannot read CRL from %s: %s", path,
+                 vlc_strerror_c(errno));
         return VLC_EGENERIC;
     }
 
@@ -661,14 +663,16 @@ static int OpenServer (vlc_tls_creds_t *crd, const char *cert, const char *key)
     block_t *certblock = block_FilePath (cert);
     if (certblock == NULL)
     {
-        msg_Err (crd, "cannot read certificate chain from %s: %m", cert);
+        msg_Err (crd, "cannot read certificate chain from %s: %s", cert,
+                 vlc_strerror_c(errno));
         return VLC_EGENERIC;
     }
 
     block_t *keyblock = block_FilePath (key);
     if (keyblock == NULL)
     {
-        msg_Err (crd, "cannot read private key from %s: %m", key);
+        msg_Err (crd, "cannot read private key from %s: %s", key,
+                 vlc_strerror_c(errno));
         block_Release (certblock);
         return VLC_EGENERIC;
     }