Remove debugging fprintf from req.c and fix the code so it properly skips over
authorDr. Stephen Henson <steve@openssl.org>
Wed, 24 Feb 1999 00:14:21 +0000 (00:14 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Wed, 24 Feb 1999 00:14:21 +0000 (00:14 +0000)
the first leading XXX. in the DN.

apps/req.c

index 8535a1e..dad1a50 100644 (file)
@@ -890,9 +890,12 @@ start:             for (;;)
                         * multiple instances 
                         */
                        for(p = v->name; *p ; p++) 
                         * multiple instances 
                         */
                        for(p = v->name; *p ; p++) 
-                               if ((*p != ':') || (*p != ',') ||
-                                                        (*p != '.')) break;
-                       if (*p) type=(char *)p;
+                               if ((*p == ':') || (*p == ',') ||
+                                                        (*p == '.')) {
+                                       p++;
+                                       if(*p) type = p;
+                                       break;
+                               }
                        /* If OBJ not recognised ignore it */
                        if ((nid=OBJ_txt2nid(type)) == NID_undef) goto start;
                        sprintf(buf,"%s_default",v->name);
                        /* If OBJ not recognised ignore it */
                        if ((nid=OBJ_txt2nid(type)) == NID_undef) goto start;
                        sprintf(buf,"%s_default",v->name);
@@ -1189,9 +1192,6 @@ char *end;
        slen = strlen(str);
        if(elen > slen) return 1;
        tmp = str + slen - elen;
        slen = strlen(str);
        if(elen > slen) return 1;
        tmp = str + slen - elen;
-#ifdef DEBUG
-       fprintf(stderr, "Matching %s, %s %s\n", str, end, tmp);
-#endif
        return strcmp(tmp, end);
 }
 
        return strcmp(tmp, end);
 }