summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2015-03-12 14:09:00 +0000
committerMatt Caswell <matt@openssl.org>2015-03-17 14:49:47 +0000
commitc1559f5046092b542f8033bb8eec8bd88ce0d8f2 (patch)
treef4ea1829713a5e3ffdeee7b0e32c9a9dc55e80ca /apps
parentd8d2e503593ac429fa04b96c7722dcf1c33bdeb3 (diff)
Dead code removal from apps
Some miscellaneous removal of dead code from apps. Also fix an issue with error handling with pkcs7. Reviewed-by: Richard Levitte <levitte@openssl.org> (cherry picked from commit 11abf92259e899f4f7da4a3e80781e84b0fb1a64)
Diffstat (limited to 'apps')
-rw-r--r--apps/pkcs7.c10
-rw-r--r--apps/s_server.c2
2 files changed, 6 insertions, 6 deletions
diff --git a/apps/pkcs7.c b/apps/pkcs7.c
index 4d80f8249e..643507f216 100644
--- a/apps/pkcs7.c
+++ b/apps/pkcs7.c
@@ -189,11 +189,11 @@ int MAIN(int argc, char **argv)
if (infile == NULL)
BIO_set_fp(in, stdin, BIO_NOCLOSE);
else {
- if (BIO_read_filename(in, infile) <= 0)
- if (in == NULL) {
- perror(infile);
- goto end;
- }
+ if (BIO_read_filename(in, infile) <= 0) {
+ BIO_printf(bio_err, "unable to load input file\n");
+ ERR_print_errors(bio_err);
+ goto end;
+ }
}
if (informat == FORMAT_ASN1)
diff --git a/apps/s_server.c b/apps/s_server.c
index d5d2492a26..a8491acfdd 100644
--- a/apps/s_server.c
+++ b/apps/s_server.c
@@ -347,7 +347,7 @@ static unsigned int psk_server_cb(SSL *ssl, const char *identity,
}
if (s_debug)
BIO_printf(bio_s_out, "identity_len=%d identity=%s\n",
- identity ? (int)strlen(identity) : 0, identity);
+ (int)strlen(identity), identity);
/* here we could lookup the given identity e.g. from a database */
if (strcmp(identity, psk_identity) != 0) {