aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid von Oheimb <David.von.Oheimb@siemens.com>2017-12-26 19:33:04 +0100
committerDr. David von Oheimb <David.von.Oheimb@siemens.com>2020-04-24 18:00:24 +0200
commit3ee4e8cea72056ea56fdbfff8bb1b6daf2276933 (patch)
tree71dd09334a808036fbf524a9f3f31d2a63ce2266
parent51c833ac2d46653c8124a25def4df0b3d1a832b5 (diff)
downloadopenssl-3ee4e8cea72056ea56fdbfff8bb1b6daf2276933.zip
openssl-3ee4e8cea72056ea56fdbfff8bb1b6daf2276933.tar.gz
openssl-3ee4e8cea72056ea56fdbfff8bb1b6daf2276933.tar.bz2
Remove a bad 'goto end' and a few superfluous ones in apps/lib/apps.c
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)
-rw-r--r--apps/lib/apps.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/apps/lib/apps.c b/apps/lib/apps.c
index 80dafaf..e627057 100644
--- a/apps/lib/apps.c
+++ b/apps/lib/apps.c
@@ -488,7 +488,6 @@ X509 *load_cert(const char *file, int format, const char *desc)
OPT_FMT_HTTP |
#endif
OPT_FMT_PEMDER | OPT_FMT_PKCS12);
- goto end;
}
end:
@@ -519,16 +518,13 @@ X509_CRL *load_crl(const char *infile, int format, const char *desc)
x = d2i_X509_CRL_bio(in, NULL);
} else if (format == FORMAT_PEM) {
x = PEM_read_bio_X509_CRL(in, NULL, NULL, NULL);
- } else {
+ } else
print_format_error(format, OPT_FMT_PEMDER);
- goto end;
- }
end:
if (x == NULL && desc != NULL) {
BIO_printf(bio_err, "unable to load %s\n", desc);
ERR_print_errors(bio_err);
- goto end;
}
BIO_free(in);
return x;
@@ -547,10 +543,8 @@ X509_REQ *load_csr(const char *file, int format, const char *desc)
req = d2i_X509_REQ_bio(in, NULL);
else if (format == FORMAT_PEM)
req = PEM_read_bio_X509_REQ(in, NULL, NULL, NULL);
- else {
+ else
print_format_error(format, OPT_FMT_PEMDER);
- goto end;
- }
end:
if (req == NULL && desc != NULL) {
@@ -628,8 +622,8 @@ EVP_PKEY *load_key(const char *file, int format, int maybe_stdin,
| OPT_FMT_ENGINE
#endif
);
- goto end;
}
+
end:
BIO_free(key);
if (pkey == NULL && desc != NULL) {