summaryrefslogtreecommitdiffstats
path: root/apps/x509.c
diff options
context:
space:
mode:
authorDavid von Oheimb <David.von.Oheimb@siemens.com>2017-12-15 20:50:37 +0100
committerDr. David von Oheimb <David.von.Oheimb@siemens.com>2020-04-24 18:00:24 +0200
commit9d5aca655323d795ad8c28fa6be47250a08c18c7 (patch)
treedf73c17256c994c1f43ea708f18fc172cd17e7f9 /apps/x509.c
parent852c2ed260860b6b85c84f9fe96fb4d23d49c9f2 (diff)
Add function load_csr(file,format,desc) to apps/lib/apps.c
Make use of new load_csr() in 'ca', 'req', and 'x509' app Add '-inform' and '-certform' option to 'ca' app Add 'desc' parameter to load_crl() function defined in apps/lib/apps.c Allow 'desc' parameter to be NULL (gives option to suppress error output) Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com> (Merged from https://github.com/openssl/openssl/pull/4940)
Diffstat (limited to 'apps/x509.c')
-rw-r--r--apps/x509.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/apps/x509.c b/apps/x509.c
index 16c1f95754..d891b42f92 100644
--- a/apps/x509.c
+++ b/apps/x509.c
@@ -572,14 +572,8 @@ int x509_main(int argc, char **argv)
if (reqfile) {
EVP_PKEY *pkey;
- BIO *in;
-
- in = bio_open_default(infile, 'r', informat);
- if (in == NULL)
- goto end;
- req = PEM_read_bio_X509_REQ(in, NULL, NULL, NULL);
- BIO_free(in);
+ req = load_csr(infile, informat, "certificate request input");
if (req == NULL) {
ERR_print_errors(bio_err);
goto end;