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 11abf92259)
This commit is contained in:
Matt Caswell 2015-03-12 14:09:00 +00:00
parent 28e4f659c5
commit 636c42d747
2 changed files with 6 additions and 6 deletions

View File

@ -189,11 +189,11 @@ int MAIN(int argc, char **argv)
if (infile == NULL) if (infile == NULL)
BIO_set_fp(in, stdin, BIO_NOCLOSE); BIO_set_fp(in, stdin, BIO_NOCLOSE);
else { else {
if (BIO_read_filename(in, infile) <= 0) if (BIO_read_filename(in, infile) <= 0) {
if (in == NULL) { BIO_printf(bio_err, "unable to load input file\n");
perror(infile); ERR_print_errors(bio_err);
goto end; goto end;
} }
} }
if (informat == FORMAT_ASN1) if (informat == FORMAT_ASN1)

View File

@ -334,7 +334,7 @@ static unsigned int psk_server_cb(SSL *ssl, const char *identity,
} }
if (s_debug) if (s_debug)
BIO_printf(bio_s_out, "identity_len=%d identity=%s\n", 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 */ /* here we could lookup the given identity e.g. from a database */
if (strcmp(identity, psk_identity) != 0) { if (strcmp(identity, psk_identity) != 0) {