]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
Corrected check for present constraints in unsupported types.
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Wed, 19 Feb 2014 06:39:44 +0000 (07:39 +0100)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Wed, 19 Feb 2014 06:39:44 +0000 (07:39 +0100)
lib/x509/name_constraints.c

index e9763db7722589c88d99cb0551e0a42bd14a64e6..dd07e6fe9d41a206369bdfa7fd3203f4e4ba340a 100644 (file)
@@ -507,10 +507,12 @@ gnutls_datum_t rname;
        i = 0;
        do {
                ret = gnutls_x509_name_constraints_get_excluded(nc, i++, &rtype, &rname);
-               if (ret >= 0 && rtype != type)
-                       continue;
-
-               return gnutls_assert_val(0);
+               if (ret >= 0) {
+                       if (rtype != type)
+                               continue;
+                       else
+                               return gnutls_assert_val(0);
+               }
 
        } while(ret == 0);