Don't use FORMAT_BASE64 format when compressing / decompressing

When compressing, the output / input is a binary format, not a text
format like BASE64.  This is important on Windows, where a ^Z in a
text file is seen as EOF, and there could be a ^Z somewhere in a
compressed file, cutting it short as input.

Reviewed-by: Matt Caswell <matt@openssl.org>
This commit is contained in:
Richard Levitte 2016-04-13 02:40:39 +02:00
parent da430a5555
commit 802d224308
1 changed files with 9 additions and 6 deletions

View File

@ -313,6 +313,9 @@ int enc_main(int argc, char **argv)
if (verbose) if (verbose)
BIO_printf(bio_err, "bufsize=%d\n", bsize); BIO_printf(bio_err, "bufsize=%d\n", bsize);
#ifdef ZLIB
if (!do_zlib)
#endif
if (base64) { if (base64) {
if (enc) if (enc)
outformat = FORMAT_BASE64; outformat = FORMAT_BASE64;