diff options
author | Richard Levitte <levitte@openssl.org> | 2015-09-06 12:20:12 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2015-09-06 13:34:49 +0200 |
commit | a60994df34fe6a694441471c7f8dcf9661fb091d (patch) | |
tree | c6e546670e04806e55e4cec9b06303879cc1ed16 /apps/s_server.c | |
parent | a412b8919821efd00121d28cf2441c5445bee602 (diff) |
Change the treatment of stdin and stdout to allow binary data
If the output to stdout or the input from stdin is meant to be binary,
it's deeply unsetting to get the occasional LF converted to CRLF or
the other way around. If someone happens to forget to redirect stdin
or stdout, they will get gibberish anyway, line ending conversion will
not change that.
Therefore, let's not have dup_bio_* decide unilaterally what mode the
BIO derived from stdin and stdout, and rather let the app decide by
declaring the intended format.
Reviewed-by: Tim Hudson <tjh@openssl.org>
Diffstat (limited to 'apps/s_server.c')
-rw-r--r-- | apps/s_server.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/s_server.c b/apps/s_server.c index e7c794c2a5..8fe1ebe224 100644 --- a/apps/s_server.c +++ b/apps/s_server.c @@ -1575,10 +1575,10 @@ int s_server_main(int argc, char *argv[]) if (s_quiet && !s_debug) { bio_s_out = BIO_new(BIO_s_null()); if (s_msg && !bio_s_msg) - bio_s_msg = dup_bio_out(); + bio_s_msg = dup_bio_out(FORMAT_TEXT); } else { if (bio_s_out == NULL) - bio_s_out = dup_bio_out(); + bio_s_out = dup_bio_out(FORMAT_TEXT); } } #if !defined(OPENSSL_NO_RSA) || !defined(OPENSSL_NO_DSA) || !defined(OPENSSL_NO_EC) |