always include <string.h> (we do this in various other header files,
[openssl.git] / apps / nseq.c
index cc88d50ceba50ef82b1a0beb0f1c1cea23d855cc..93adcdfef8d65754c4a52472060d4ed3b0586859 100644 (file)
@@ -119,11 +119,18 @@ int MAIN(int argc, char **argv)
                                 "Can't open output file %s\n", outfile);
                        goto end;
                }
-       } else out = BIO_new_fp(stdout, BIO_NOCLOSE);
-
+       } else {
+               out = BIO_new_fp(stdout, BIO_NOCLOSE);
+#ifdef OPENSSL_SYS_VMS
+               {
+               BIO *tmpbio = BIO_new(BIO_f_linebuffer());
+               out = BIO_push(tmpbio, out);
+               }
+#endif
+       }
        if (toseq) {
                seq = NETSCAPE_CERT_SEQUENCE_new();
-               seq->certs = sk_X509_new(NULL);
+               seq->certs = sk_X509_new_null();
                while((x509 = PEM_read_bio_X509(in, NULL, NULL, NULL))) 
                    sk_X509_push(seq->certs,x509);
 
@@ -152,7 +159,7 @@ int MAIN(int argc, char **argv)
        ret = 0;
 end:
        BIO_free(in);
-       BIO_free(out);
+       BIO_free_all(out);
        NETSCAPE_CERT_SEQUENCE_free(seq);
 
        EXIT(ret);