[vlc-commits] gnutls: print error if key storage fails

Rémi Denis-Courmont git at videolan.org
Wed Oct 3 18:37:02 CEST 2012


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Oct  3 19:36:24 2012 +0300| [c2acc214605c26dfe5d56f7645154fc9f7301bb2] | committer: Rémi Denis-Courmont

gnutls: print error if key storage fails

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c2acc214605c26dfe5d56f7645154fc9f7301bb2
---

 modules/misc/gnutls.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/modules/misc/gnutls.c b/modules/misc/gnutls.c
index 4609b77..03ec439 100644
--- a/modules/misc/gnutls.c
+++ b/modules/misc/gnutls.c
@@ -313,8 +313,11 @@ static int gnutls_CertSearch (vlc_tls_t *obj, const char *host,
             time (&expiry);
             expiry += 24 * 60 * 60;
         case 3:
-            gnutls_store_pubkey (NULL, NULL, host, service, GNUTLS_CRT_X509,
-                                 datum, expiry, 0);
+            val = gnutls_store_pubkey (NULL, NULL, host, service,
+                                       GNUTLS_CRT_X509, datum, expiry, 0);
+            if (val)
+                msg_Err (obj, "cannot store X.509 certificate: %s",
+                         gnutls_strerror (val));
             return 0;
     }
     return -1;



More information about the vlc-commits mailing list