Allow to specify filename on sha1-ia64.pl command line.
[openssl.git] / crypto / asn1 / t_x509.c
index 5115b8d0b5aeb3d28cf56ec2c52c3b36295fd2e3..1bb8e82d63fb5361bf41091e8cd3d1689a3ddfcb 100644 (file)
@@ -433,19 +433,18 @@ err:
 int X509_NAME_print(BIO *bp, X509_NAME *name, int obase)
        {
        char *s,*c,*b;
-       int ret=0,l,ll,i,first=1;
+       int ret=0,l,i;
 
-       ll=80-2-obase;
+       l=80-2-obase;
 
-       b=s=X509_NAME_oneline(name,NULL,0);
-       if (!*s)
+       b=X509_NAME_oneline(name,NULL,0);
+       if (!*b)
                {
                OPENSSL_free(b);
                return 1;
                }
-       s++; /* skip the first slash */
+       s=b+1; /* skip the first slash */
 
-       l=ll;
        c=s;
        for (;;)
                {
@@ -467,20 +466,9 @@ int X509_NAME_print(BIO *bp, X509_NAME *name, int obase)
                        (*s == '\0'))
 #endif
                        {
-                       if ((l <= 0) && !first)
-                               {
-                               first=0;
-                               if (BIO_write(bp,"\n",1) != 1) goto err;
-                               for (i=0; i<obase; i++)
-                                       {
-                                       if (BIO_write(bp," ",1) != 1) goto err;
-                                       }
-                               l=ll;
-                               }
                        i=s-c;
                        if (BIO_write(bp,c,i) != i) goto err;
-                       c+=i;
-                       c++;
+                       c=s+1;  /* skip following slash */
                        if (*s != '\0')
                                {
                                if (BIO_write(bp,", ",2) != 2) goto err;