aboutsummaryrefslogtreecommitdiff
path: root/openssl/vendor/current/apps/enc.c
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2006-10-09 16:29:05 +0000
committerRob Austein <sra@hactrn.net>2006-10-09 16:29:05 +0000
commit1b2aa7959c86a835491c8cfca8c0683b747c1855 (patch)
tree9a0ba58647a2d57115f5c003ca4673e7693c950a /openssl/vendor/current/apps/enc.c
parent084adb601f2d375395c6cdcedf8af91f1065fe4e (diff)
Merge in vendor branch OpenSSL changes 0.9.8b -> 0.9.8d
svn path=/openssl/vendor/current/CHANGES; revision=375
Diffstat (limited to 'openssl/vendor/current/apps/enc.c')
-rw-r--r--openssl/vendor/current/apps/enc.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/openssl/vendor/current/apps/enc.c b/openssl/vendor/current/apps/enc.c
index ea948f8d..3e3e8eb4 100644
--- a/openssl/vendor/current/apps/enc.c
+++ b/openssl/vendor/current/apps/enc.c
@@ -340,7 +340,7 @@ bad:
}
/* It must be large enough for a base64 encoded line */
- if (n < 80) n=80;
+ if (base64 && n < 80) n=80;
bsize=(int)n;
if (verbose) BIO_printf(bio_err,"bufsize=%d\n",bsize);
@@ -370,7 +370,11 @@ bad:
}
if (inf == NULL)
+ {
+ if (bufsize != NULL)
+ setvbuf(stdin, (char *)NULL, _IONBF, 0);
BIO_set_fp(in,stdin,BIO_NOCLOSE);
+ }
else
{
if (BIO_read_filename(in,inf) <= 0)
@@ -421,6 +425,8 @@ bad:
if (outf == NULL)
{
BIO_set_fp(out,stdout,BIO_NOCLOSE);
+ if (bufsize != NULL)
+ setvbuf(stdout, (char *)NULL, _IONBF, 0);
#ifdef OPENSSL_SYS_VMS
{
BIO *tmpbio = BIO_new(BIO_f_linebuffer());