[vlc-commits] GnuTLS: fix server assertion failure in client certificate verification

Rémi Denis-Courmont git at videolan.org
Sat Jul 23 13:03:23 CEST 2011


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Jul 23 14:01:54 2011 +0300| [72c07065860ad8e70674714532da05e373acdc88] | committer: Rémi Denis-Courmont

GnuTLS: fix server assertion failure in client certificate verification

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

 modules/misc/gnutls.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/misc/gnutls.c b/modules/misc/gnutls.c
index c185c7b..881640c 100644
--- a/modules/misc/gnutls.c
+++ b/modules/misc/gnutls.c
@@ -355,8 +355,8 @@ gnutls_HandshakeAndValidate( tls_session_t *session )
         goto error;
     }
 
-    assert( p_sys->psz_hostname != NULL );
-    if ( !gnutls_x509_crt_check_hostname( cert, p_sys->psz_hostname ) )
+    if( p_sys->psz_hostname != NULL
+     && !gnutls_x509_crt_check_hostname( cert, p_sys->psz_hostname ) )
     {
         msg_Err( session, "Certificate does not match \"%s\"",
                  p_sys->psz_hostname );



More information about the vlc-commits mailing list