diff options
author | Richard Levitte <levitte@openssl.org> | 2015-09-04 02:46:47 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2015-09-06 01:29:36 +0200 |
commit | d303b9d85e1888494785f87ebd9bd233e63564a9 (patch) | |
tree | efb8e31a76f8c4541d79246b10a4fb70f79347c7 /apps/enc.c | |
parent | e9daa8150abc8d96dd1e4dcd764355851f06ef2b (diff) |
Make the handling of output and input formats consistent
Most of all, we needed to sort out which ones are binary and which
ones are text, and make sure they are treated accordingly and
consistently so
Reviewed-by: Tim Hudson <tjh@openssl.org>
Diffstat (limited to 'apps/enc.c')
-rw-r--r-- | apps/enc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/enc.c b/apps/enc.c index 18fcb9505d..3b8d7eb265 100644 --- a/apps/enc.c +++ b/apps/enc.c @@ -330,7 +330,7 @@ int enc_main(int argc, char **argv) unbuffer(stdin); in = dup_bio_in(); } else - in = bio_open_default(infile, "r"); + in = bio_open_default(infile, base64 ? "r" : "rb"); if (in == NULL) goto end; @@ -366,7 +366,7 @@ int enc_main(int argc, char **argv) } } - out = bio_open_default(outfile, "w"); + out = bio_open_default(outfile, base64 ? "w" : "wb"); if (out == NULL) goto end; |