GnuTLS: fix server assertion failure in client certificate verification
authorRémi Denis-Courmont <remi@remlab.net>
Sat, 23 Jul 2011 11:01:54 +0000 (14:01 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Sat, 23 Jul 2011 11:01:54 +0000 (14:01 +0300)
modules/misc/gnutls.c

index c185c7b..881640c 100644 (file)
@@ -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 );