Change the way apps open their input and output files
[openssl.git] / apps / dgst.c
index e6142caaffca21e791949a5f6e489a159705ff0e..99568f42a6279d29e393158f82fa504a93aa5352 100644 (file)
@@ -275,7 +275,7 @@ int dgst_main(int argc, char **argv)
     if (randfile)
         app_RAND_load_file(randfile, 0);
 
-    out = bio_open_default(outfile, out_bin ? "wb" : "w");
+    out = bio_open_default(outfile, 'w', out_bin ? FORMAT_BINARY : FORMAT_TEXT);
     if (out == NULL)
         goto end;