Update from HEAD.
[oweals/openssl.git] / apps / ca.c
index 25717283b0e7ffb17d14e3564c237899a4cf1949..87f0405f5d57535c320133d737616d0d0a4bd405 100644 (file)
--- a/apps/ca.c
+++ b/apps/ca.c
@@ -969,7 +969,6 @@ bad:
                        if (verbose) BIO_printf(bio_err,
                                "Done. %d entries marked as expired\n",i); 
                        }
-                       goto err;
                }
 
        /*****************************************************************/
@@ -1521,6 +1520,7 @@ err:
        if (x509) X509_free(x509);
        X509_CRL_free(crl);
        NCONF_free(conf);
+       NCONF_free(extconf);
        OBJ_cleanup();
        apps_shutdown();
        OPENSSL_EXIT(ret);
@@ -2882,13 +2882,22 @@ int old_entry_print(BIO *bp, ASN1_OBJECT *obj, ASN1_STRING *str)
        p=(char *)str->data;
        for (j=str->length; j>0; j--)
                {
+#ifdef CHARSET_EBCDIC
+               if ((*p >= 0x20) && (*p <= 0x7e))
+                       BIO_printf(bp,"%c",os_toebcdic[*p]);
+#else
                if ((*p >= ' ') && (*p <= '~'))
                        BIO_printf(bp,"%c",*p);
+#endif
                else if (*p & 0x80)
                        BIO_printf(bp,"\\0x%02X",*p);
                else if ((unsigned char)*p == 0xf7)
                        BIO_printf(bp,"^?");
+#ifdef CHARSET_EBCDIC
+               else    BIO_printf(bp,"^%c",os_toebcdic[*p+0x40]);
+#else
                else    BIO_printf(bp,"^%c",*p+'@');
+#endif
                p++;
                }
        BIO_printf(bp,"'\n");