projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make the handling of output and input formats consistent
[openssl.git]
/
apps
/
x509.c
diff --git
a/apps/x509.c
b/apps/x509.c
index acce9e9ddd2629699a56deeaaca28ba4afa7987c..8020e8a086a2ec98a3cb1a3a8428b733494b32ae 100644
(file)
--- a/
apps/x509.c
+++ b/
apps/x509.c
@@
-496,7
+496,7
@@
int x509_main(int argc, char **argv)
if (!app_load_modules(NULL))
goto end;
if (!app_load_modules(NULL))
goto end;
- out = bio_open_default(outfile,
"w"
);
+ out = bio_open_default(outfile,
WB(outformat)
);
if (out == NULL)
goto end;
if (out == NULL)
goto end;
@@
-556,7
+556,7
@@
int x509_main(int argc, char **argv)
BIO_printf(bio_err, "We need a private key to sign with\n");
goto end;
}
BIO_printf(bio_err, "We need a private key to sign with\n");
goto end;
}
- in = bio_open_default(infile,
"r"
);
+ in = bio_open_default(infile,
RB(informat)
);
if (in == NULL)
goto end;
req = PEM_read_bio_X509_REQ(in, NULL, NULL, NULL);
if (in == NULL)
goto end;
req = PEM_read_bio_X509_REQ(in, NULL, NULL, NULL);