]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
bug fix in gnutls_x509_crt_set_dn() at DN parsing.
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Tue, 5 Nov 2013 22:17:47 +0000 (23:17 +0100)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Tue, 5 Nov 2013 22:17:55 +0000 (23:17 +0100)
lib/x509/x509_dn.c

index 31d83b69ee7afa50ab4dd096dd519e0bafd0b68a..384ad87422392aab20b643db92d3e62b1b3ce169 100644 (file)
@@ -132,7 +132,7 @@ gnutls_datum_t name, val;
 
   if (crt == NULL || dn == NULL)
     return gnutls_assert_val(GNUTLS_E_INVALID_REQUEST);
-    
+
   /* For each element */
   while (*p != 0 && *p != '\n')
     {
@@ -156,7 +156,8 @@ gnutls_datum_t name, val;
 
       if (*p != ',' && *p != 0 && *p != '\n')
         return gnutls_assert_val(GNUTLS_E_PARSING_ERROR);
-      p++;
+      if (*p == ',')
+       p++;
     }
     
   return 0;