Change the way apps open their input and output files

The different apps had the liberty to decide whether they would open their
input and output files in binary mode or not, which could be confusing if
two different apps were handling the same type of file in different ways.

The solution is to centralise the decision of low level file organisation,
and that the apps would use a selection of formats to state the intent of
the file.

Reviewed-by: Tim Hudson <tjh@openssl.org>
This commit is contained in:
Richard Levitte
2015-09-04 12:49:06 +02:00
parent d303b9d85e
commit bdd58d9846
36 changed files with 168 additions and 144 deletions

View File

@@ -112,10 +112,10 @@ int nseq_main(int argc, char **argv)
if (!app_load_modules(NULL))
goto end;
in = bio_open_default(infile, "r");
in = bio_open_default(infile, 'r', FORMAT_PEM);
if (in == NULL)
goto end;
out = bio_open_default(outfile, "w");
out = bio_open_default(outfile, 'w', FORMAT_PEM);
if (out == NULL)
goto end;